aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/lib.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-11-23 17:33:39 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-11-23 17:33:39 +0100
commitee57f06544a7281138ee909995fde4a1b3993c4b (patch)
treed8b634161ef76b39df6b05d6375987227054c193 /planetwars-server/src/lib.rs
parent1eb81092d7a3e7925ae8e4258aa35a009f911b6e (diff)
downloadplanetwars.dev-ee57f06544a7281138ee909995fde4a1b3993c4b.tar.xz
planetwars.dev-ee57f06544a7281138ee909995fde4a1b3993c4b.zip
implement create new map endpoint
Diffstat (limited to 'planetwars-server/src/lib.rs')
-rw-r--r--planetwars-server/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
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))