diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
| commit | 54894f9de9bad4fecb2a116d59a03cdd003f84c0 (patch) | |
| tree | 6ce5517cecf23d4e93d7a381a374e1fa6c810cee /rust/schist_backend/src/routes/category.rs | |
| parent | 8a30bcbdf9264d235bf93da3df8e170cfde53d02 (diff) | |
Moves rust workspace to root
Diffstat (limited to 'rust/schist_backend/src/routes/category.rs')
| -rw-r--r-- | rust/schist_backend/src/routes/category.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/rust/schist_backend/src/routes/category.rs b/rust/schist_backend/src/routes/category.rs deleted file mode 100644 index b2412ac..0000000 --- a/rust/schist_backend/src/routes/category.rs +++ /dev/null @@ -1,16 +0,0 @@ -use rocket::get; -use rocket::http::Status; -use rocket::serde::json::Json; -use schist_models::category::Category; -use schist_queries::categories::get_all_categories as get_all_categories_query; - -use crate::databases::UserDataDb; - -#[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 }) -} |
