summaryrefslogtreecommitdiff
path: root/backend/src/routes/category.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2024-10-16 12:51:21 +0100
committerJoe Carstairs <me@joeac.net>2024-10-16 12:51:21 +0100
commit27b95c9186bd45edd4c982a7cc89cf69cf2c5d46 (patch)
treebf104ff9d64e601bfec5516eb51ef298f3095e9b /backend/src/routes/category.rs
parent76974785294089965efc3f55b2a08d4089029c52 (diff)
All backend stuff lives in backend folder
Diffstat (limited to 'backend/src/routes/category.rs')
-rw-r--r--backend/src/routes/category.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/backend/src/routes/category.rs b/backend/src/routes/category.rs
deleted file mode 100644
index 01fd8d1..0000000
--- a/backend/src/routes/category.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-use rocket::get;
-use rocket::http::Status;
-use rocket::serde::json::Json;
-
-use crate::databases::UserDataDb;
-use crate::models::category::Category;
-use crate::queries::categories::get_all_categories as get_all_categories_query;
-
-#[get("/category")]
-pub async fn get_all_categories(user_data_db: UserDataDb) -> Result<Json<Vec<Category>>, Status> {
- user_data_db
- .run(get_all_categories_query)
- .await
- .map(Json)
- .map_err(|_| Status { code: 500 })
-}