aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/lib.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-01-02 16:14:03 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-01-02 16:14:03 +0100
commit85dcf3ba2fd0cf907610625399db691b274118bb (patch)
tree3fd041b1de19a9d3130be2045a7f9b9bd3a85fe0 /planetwars-server/src/lib.rs
parentbdb77f97d6af5a59e80d2b2552cd6994754cbf29 (diff)
downloadplanetwars.dev-85dcf3ba2fd0cf907610625399db691b274118bb.tar.xz
planetwars.dev-85dcf3ba2fd0cf907610625399db691b274118bb.zip
store matches in database
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 1d08580..7eaa5a0 100644
--- a/planetwars-server/src/lib.rs
+++ b/planetwars-server/src/lib.rs
@@ -48,7 +48,10 @@ pub async fn api() -> Router {
"/bots/:bot_id/upload",
post(routes::bots::upload_code_multipart),
)
- .route("/matches", post(routes::matches::play_match))
+ .route(
+ "/matches",
+ get(routes::matches::list_matches).post(routes::matches::play_match),
+ )
.layer(AddExtensionLayer::new(pool));
api
}