refact: split POST and GET methods

This commit is contained in:
meeg_leeto 2022-04-29 18:47:18 +01:00
parent 1a10b12a5d
commit 1993fa4893
1 changed files with 3 additions and 1 deletions

View File

@ -483,7 +483,9 @@ async fn serve() {
.and(warp::path::param())
.map(|slug: String| warp::reply());
let routes = warp::get().and(homepage.or(shorten).or(link));
let get_routes = warp::get().and(homepage.or(link));
let post_routes = warp::post().and(shorten);
let routes = get_routes.or(post_routes);
println!(
"Now serving lonk at IP {}, port {}!",