From e145947d052450618af3ba094e66a27c3c7f86e4 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 1 Jan 2022 11:26:49 +0100 Subject: match form stubs --- planetwars-server/src/lib.rs | 6 +++++- 1 file changed, 5 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 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 } -- cgit v1.2.3