summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJomar Milan <jomarm@jomarm.com>2026-06-09 17:15:24 -0700
committerJomar Milan <jomarm@jomarm.com>2026-06-09 17:15:24 -0700
commitacf5e40d02a25a6e99ef23ef61aca8cd261de9d3 (patch)
treeeb7da2b27e8a47ac1005ded7a0d70f5579ab635b /src/main.rs
parent27e1ef1ad8d7d834054b750708343378ce9e9ec5 (diff)
Add player hand display in browser
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d9852e3..fc0a7bb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -65,6 +65,7 @@ async fn serve_static(Path(path): Path<String>) -> Response {
Some(content) => {
let mime = match path.split('.').next_back() {
Some("js") => "application/javascript",
+ Some("css") => "text/css",
_ => "application/octet-stream",
};
([(header::CONTENT_TYPE, mime)], content.data).into_response()
@@ -73,7 +74,9 @@ async fn serve_static(Path(path): Path<String>) -> Response {
}
}
-async fn find_session(Query(query): Query<HashMap<String, String>>) -> axum::response::Result<Redirect> {
+async fn find_session(
+ Query(query): Query<HashMap<String, String>>,
+) -> axum::response::Result<Redirect> {
let id = query.get("id").ok_or(StatusCode::NOT_FOUND)?;
Ok(Redirect::to(format!("/session/{}", id).as_str()))
}