diff options
author | Joris | 2024-06-10 08:55:25 +0200 |
---|---|---|
committer | Joris | 2024-06-10 08:55:25 +0200 |
commit | 9e48c2bd8b4a3fdd73b2fc51afec14180b4b0dcf (patch) | |
tree | 6ffe8ca2369bca3c77e09e05abc2046923ca4b91 /src/routes.rs | |
parent | c1c24146266a1e35748421c1afba10b24794af26 (diff) |
Use easier path to facilitate matching on routesmain
Diffstat (limited to 'src/routes.rs')
-rw-r--r-- | src/routes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes.rs b/src/routes.rs index fed3067..c48ec24 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -41,9 +41,9 @@ pub async fn routes( include_str!("static/main.css").to_string(), "text/css", )), - (&Method::POST, [""]) => upload_file(request, db_conn, authorized_key, files_dir).await, - (&Method::GET, [file_id]) => get(db_conn, file_id, GetFile::ShowPage, files_dir).await, - (&Method::GET, [file_id, "download"]) => { + (&Method::POST, ["upload"]) => upload_file(request, db_conn, authorized_key, files_dir).await, + (&Method::GET, ["share", file_id]) => get(db_conn, file_id, GetFile::ShowPage, files_dir).await, + (&Method::GET, ["share", file_id, "download"]) => { get(db_conn, file_id, GetFile::Download, files_dir).await } _ => Ok(not_found()), |