From 71a451fa60184ba7266803267b7931f855bf160e Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 3 Mar 2021 16:25:05 +0100 Subject: [PATCH] Remove categories --- src/http.ts | 5 ----- src/interfaces/api/community.ts | 2 -- src/interfaces/api/site.ts | 8 +------- src/interfaces/others.ts | 1 - src/interfaces/source.ts | 6 ------ src/interfaces/views.ts | 2 -- src/websocket.ts | 4 ---- 7 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/http.ts b/src/http.ts index 50f0b099..0efc4813 100644 --- a/src/http.ts +++ b/src/http.ts @@ -54,7 +54,6 @@ import { GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, - ListCategoriesResponse, SaveSiteConfig, Search, SearchResponse, @@ -140,10 +139,6 @@ export class LemmyHttp { return this.wrapper(HttpType.Put, '/site/config', form); } - async listCategories(): Promise { - return this.wrapper(HttpType.Get, '/categories', {}); - } - async getModlog(form: GetModlog): Promise { return this.wrapper(HttpType.Get, '/modlog', form); } diff --git a/src/interfaces/api/community.ts b/src/interfaces/api/community.ts index c16c6eb5..e0de8447 100644 --- a/src/interfaces/api/community.ts +++ b/src/interfaces/api/community.ts @@ -23,7 +23,6 @@ export interface CreateCommunity { description?: string; icon?: string; banner?: string; - category_id: number; nsfw: boolean; auth: string; } @@ -79,7 +78,6 @@ export interface EditCommunity { description?: string; icon?: string; banner?: string; - category_id: number; nsfw: boolean; auth: string; } diff --git a/src/interfaces/api/site.ts b/src/interfaces/api/site.ts index 764993be..bf0e654f 100644 --- a/src/interfaces/api/site.ts +++ b/src/interfaces/api/site.ts @@ -1,4 +1,4 @@ -import { Category, UserSafeSettings } from '../source'; +import { UserSafeSettings } from '../source'; import { CommentView, CommunityView, @@ -16,12 +16,6 @@ import { UserViewSafe, } from '../views'; -export interface ListCategories {} - -export interface ListCategoriesResponse { - categories: Category[]; -} - /** * Search types are `All, Comments, Posts, Communities, Users, Url` */ diff --git a/src/interfaces/others.ts b/src/interfaces/others.ts index 03b7f3da..8cf0992c 100644 --- a/src/interfaces/others.ts +++ b/src/interfaces/others.ts @@ -8,7 +8,6 @@ export enum UserOperation { CreateCommunity, CreatePost, ListCommunities, - ListCategories, GetPost, GetCommunity, CreateComment, diff --git a/src/interfaces/source.ts b/src/interfaces/source.ts index 48a4b77d..8d50f764 100644 --- a/src/interfaces/source.ts +++ b/src/interfaces/source.ts @@ -198,7 +198,6 @@ export interface CommunitySafe { name: string; title: string; description?: string; - category_id: number; creator_id: number; removed: boolean; published: string; @@ -238,11 +237,6 @@ export interface Comment { local: boolean; } -export interface Category { - id: number; - name: string; -} - export interface UserMention { id: number; recipient_id: number; diff --git a/src/interfaces/views.ts b/src/interfaces/views.ts index 4dd81dca..f45da9ea 100644 --- a/src/interfaces/views.ts +++ b/src/interfaces/views.ts @@ -6,7 +6,6 @@ import { UserAggregates, } from './aggregates'; import { - Category, Comment, CommentReport, CommunitySafe, @@ -182,7 +181,6 @@ export interface CommunityUserBanView { export interface CommunityView { community: CommunitySafe; creator: UserSafe; - category: Category; subscribed: boolean; counts: CommunityAggregates; } diff --git a/src/websocket.ts b/src/websocket.ts index 1943351e..ffc215a1 100644 --- a/src/websocket.ts +++ b/src/websocket.ts @@ -124,10 +124,6 @@ export class LemmyWebsocket { return wrapper(UserOperation.GetFollowedCommunities, form); } - listCategories() { - return wrapper(UserOperation.ListCategories, {}); - } - createPost(form: CreatePost) { return wrapper(UserOperation.CreatePost, form); }