Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove categories #6

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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