From ee57f06544a7281138ee909995fde4a1b3993c4b Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 23 Nov 2022 17:33:39 +0100 Subject: implement create new map endpoint --- planetwars-server/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'planetwars-server/src/lib.rs') diff --git a/planetwars-server/src/lib.rs b/planetwars-server/src/lib.rs index 316458c..2045eda 100644 --- a/planetwars-server/src/lib.rs +++ b/planetwars-server/src/lib.rs @@ -137,7 +137,10 @@ fn api() -> Router { "/matches/:match_id/log", get(routes::matches::get_match_log), ) - .route("/maps", get(routes::maps::list_maps)) + .route( + "/maps", + get(routes::maps::list_maps).post(routes::maps::create_map), + ) .route("/leaderboard", get(routes::bots::get_ranking)) .route("/submit_bot", post(routes::demo::submit_bot)) .route("/save_bot", post(routes::bots::save_bot)) -- cgit v1.2.3