We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf79dd9 commit 2d19121Copy full SHA for 2d19121
ch_03/src/main.rs
@@ -52,7 +52,7 @@ impl Reject for InvalidId {}
52
53
async fn get_questions() -> Result<impl warp::Reply, warp::Rejection> {
54
let question = Question::new(
55
- QuestionId::from_str("A").expect("No id provided"),
+ QuestionId::from_str("1").expect("No id provided"),
56
"First Question".to_string(),
57
"Content of question".to_string(),
58
Some(vec!("faq".to_string())),
@@ -95,7 +95,7 @@ async fn main() {
95
let cors = warp::cors()
96
.allow_any_origin()
97
.allow_header("content-type")
98
- .allow_methods(&[Method::PUT, Method::DELETE]);
+ .allow_methods(&[Method::PUT, Method::DELETE, Method::GET, Method::POST]);
99
100
let get_items = warp::get()
101
.and(warp::path("questions"))
0 commit comments