diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-01 11:26:49 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-01 11:26:49 +0100 |
commit | e145947d052450618af3ba094e66a27c3c7f86e4 (patch) | |
tree | 5aff15f6ffb98710323b0ebadb58f733e75cbead /planetwars-server/src/lib.rs | |
parent | 8d3b8fd8aa9603f5377f1b37963190ac2c01e9dd (diff) | |
download | planetwars.dev-e145947d052450618af3ba094e66a27c3c7f86e4.tar.xz planetwars.dev-e145947d052450618af3ba094e66a27c3c7f86e4.zip |
match form stubs
Diffstat (limited to 'planetwars-server/src/lib.rs')
-rw-r--r-- | planetwars-server/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/planetwars-server/src/lib.rs b/planetwars-server/src/lib.rs index 46c1100..01e9041 100644 --- a/planetwars-server/src/lib.rs +++ b/planetwars-server/src/lib.rs @@ -33,13 +33,17 @@ pub async fn api() -> Router { .route("/register", post(routes::users::register)) .route("/login", post(routes::users::login)) .route("/users/me", get(routes::users::current_user)) - .route("/bots", post(routes::bots::create_bot)) + .route( + "/bots", + get(routes::bots::list_bots).post(routes::bots::create_bot), + ) .route("/bots/my_bots", get(routes::bots::get_my_bots)) .route("/bots/:bot_id", get(routes::bots::get_bot)) .route( "/bots/:bot_id/upload", post(routes::bots::upload_code_multipart), ) + .route("/matches", post(routes::matches::play_match)) .layer(AddExtensionLayer::new(pool)); api } |