diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-02 16:14:03 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-02 16:14:03 +0100 |
commit | 85dcf3ba2fd0cf907610625399db691b274118bb (patch) | |
tree | 3fd041b1de19a9d3130be2045a7f9b9bd3a85fe0 /planetwars-server/src/lib.rs | |
parent | bdb77f97d6af5a59e80d2b2552cd6994754cbf29 (diff) | |
download | planetwars.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.rs | 5 |
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 } |