]> Untitled Git - lemmy.git/blobdiff - crates/api/src/site.rs
Remove categories (fixes #1429)
[lemmy.git] / crates / api / src / site.rs
index d9ed835eada32aa3b0ad7983fe8f165a737210b1..b545a72eabd78a108324b3dae7f1e0ee999ec31b 100644 (file)
@@ -10,17 +10,10 @@ use crate::{
 use actix_web::web::Data;
 use anyhow::Context;
 use lemmy_apub::fetcher::search::search_by_apub_id;
-use lemmy_db_queries::{
-  diesel_option_overwrite,
-  source::{category::Category_, site::Site_},
-  Crud,
-  SearchType,
-  SortType,
-};
+use lemmy_db_queries::{diesel_option_overwrite, source::site::Site_, Crud, SearchType, SortType};
 use lemmy_db_schema::{
   naive_now,
   source::{
-    category::Category,
     moderator::*,
     site::{Site, *},
   },
@@ -63,24 +56,6 @@ use lemmy_websocket::{
 use log::{debug, info};
 use std::str::FromStr;
 
-#[async_trait::async_trait(?Send)]
-impl Perform for ListCategories {
-  type Response = ListCategoriesResponse;
-
-  async fn perform(
-    &self,
-    context: &Data<LemmyContext>,
-    _websocket_id: Option<ConnectionId>,
-  ) -> Result<ListCategoriesResponse, LemmyError> {
-    let _data: &ListCategories = &self;
-
-    let categories = blocking(context.pool(), move |conn| Category::list_all(conn)).await??;
-
-    // Return the jwt
-    Ok(ListCategoriesResponse { categories })
-  }
-}
-
 #[async_trait::async_trait(?Send)]
 impl Perform for GetModlog {
   type Response = GetModlogResponse;