Skip to content

Commit

Permalink
Remove any() at the front to fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
justinas committed Nov 1, 2019
1 parent a1d1cf3 commit c423a84
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions oon_web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let db_arc = Arc::new(Database::connect(&db_url)?);
db_arc.migrate()?;

let base = warp::any()
let guess = warp::path("guess")
.and(warp::body::content_length_limit(2 << 12))
.map(move || db_arc.clone());

let guess = base
.and(warp::path("guess"))
.map(move || db_arc.clone())
.and(warp::body::json::<GuessRequest>())
.and(get_ip())
.and_then(guess_handler);
Expand Down

0 comments on commit c423a84

Please sign in to comment.