Skip to content

Commit

Permalink
Remove categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Mar 3, 2021
1 parent 4b95916 commit 71a451f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 27 deletions.
5 changes: 0 additions & 5 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
GetSiteConfig,
GetSiteConfigResponse,
GetSiteResponse,
ListCategoriesResponse,
SaveSiteConfig,
Search,
SearchResponse,
Expand Down Expand Up @@ -140,10 +139,6 @@ export class LemmyHttp {
return this.wrapper(HttpType.Put, '/site/config', form);
}

async listCategories(): Promise<ListCategoriesResponse> {
return this.wrapper(HttpType.Get, '/categories', {});
}

async getModlog(form: GetModlog): Promise<GetModlogResponse> {
return this.wrapper(HttpType.Get, '/modlog', form);
}
Expand Down
2 changes: 0 additions & 2 deletions src/interfaces/api/community.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface CreateCommunity {
description?: string;
icon?: string;
banner?: string;
category_id: number;
nsfw: boolean;
auth: string;
}
Expand Down Expand Up @@ -79,7 +78,6 @@ export interface EditCommunity {
description?: string;
icon?: string;
banner?: string;
category_id: number;
nsfw: boolean;
auth: string;
}
Expand Down
8 changes: 1 addition & 7 deletions src/interfaces/api/site.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Category, UserSafeSettings } from '../source';
import { UserSafeSettings } from '../source';
import {
CommentView,
CommunityView,
Expand All @@ -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`
*/
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/others.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export enum UserOperation {
CreateCommunity,
CreatePost,
ListCommunities,
ListCategories,
GetPost,
GetCommunity,
CreateComment,
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export interface CommunitySafe {
name: string;
title: string;
description?: string;
category_id: number;
creator_id: number;
removed: boolean;
published: string;
Expand Down Expand Up @@ -238,11 +237,6 @@ export interface Comment {
local: boolean;
}

export interface Category {
id: number;
name: string;
}

export interface UserMention {
id: number;
recipient_id: number;
Expand Down
2 changes: 0 additions & 2 deletions src/interfaces/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
UserAggregates,
} from './aggregates';
import {
Category,
Comment,
CommentReport,
CommunitySafe,
Expand Down Expand Up @@ -182,7 +181,6 @@ export interface CommunityUserBanView {
export interface CommunityView {
community: CommunitySafe;
creator: UserSafe;
category: Category;
subscribed: boolean;
counts: CommunityAggregates;
}
4 changes: 0 additions & 4 deletions src/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 71a451f

Please sign in to comment.