mirror of https://github.com/rwf2/Rocket.git
Fix typo in JSON example
This commit is contained in:
parent
0acfea9c71
commit
37bbf38d36
|
@ -25,7 +25,7 @@ struct Message {
|
||||||
contents: String
|
contents: String
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This example can be improved by using `route` with muliple HTTP verbs.
|
// TODO: This example can be improved by using `route` with multiple HTTP verbs.
|
||||||
#[post("/<id>", format = "application/json", data = "<message>")]
|
#[post("/<id>", format = "application/json", data = "<message>")]
|
||||||
fn new(id: ID, message: JSON<Message>, map: State<MessageMap>) -> JSON<Value> {
|
fn new(id: ID, message: JSON<Message>, map: State<MessageMap>) -> JSON<Value> {
|
||||||
let mut hashmap = map.lock().expect("map lock.");
|
let mut hashmap = map.lock().expect("map lock.");
|
||||||
|
|
Loading…
Reference in New Issue