diff --git a/src/http.ts b/src/http.ts index be445a1..29af416 100644 --- a/src/http.ts +++ b/src/http.ts @@ -112,6 +112,7 @@ import { GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, + LeaveAdmin, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, @@ -121,7 +122,6 @@ import { Search, SearchResponse, SiteResponse, - TransferSite, } from "./interfaces/api/site"; import { VERSION } from "./interfaces/others"; @@ -173,10 +173,10 @@ export class LemmyHttp { } /** - * Transfer your site to another user. + * Leave the Site admins. */ - async transferSite(form: TransferSite): Promise { - return this.wrapper(HttpType.Post, "/site/transfer", form); + async leaveAdmin(form: LeaveAdmin): Promise { + return this.wrapper(HttpType.Post, "/user/leave_admin", form); } /** diff --git a/src/interfaces/api/site.ts b/src/interfaces/api/site.ts index 770236d..c28084b 100644 --- a/src/interfaces/api/site.ts +++ b/src/interfaces/api/site.ts @@ -153,8 +153,7 @@ export interface MyUserInfo { person_blocks: PersonBlockView[]; } -export interface TransferSite { - person_id: number; +export interface LeaveAdmin { auth: string; } diff --git a/src/interfaces/others.ts b/src/interfaces/others.ts index 23f2d7c..72fce46 100644 --- a/src/interfaces/others.ts +++ b/src/interfaces/others.ts @@ -52,7 +52,7 @@ export enum UserOperation { MarkAllAsRead, SaveUserSettings, TransferCommunity, - TransferSite, + LeaveAdmin, DeleteAccount, PasswordReset, PasswordChange, diff --git a/src/interfaces/source.ts b/src/interfaces/source.ts index 48b3401..c58ccb3 100644 --- a/src/interfaces/source.ts +++ b/src/interfaces/source.ts @@ -42,7 +42,6 @@ export interface Site { id: number; name: string; sidebar?: string; - creator_id: number; published: string; updated?: string; enable_downvotes: boolean; diff --git a/src/websocket.ts b/src/websocket.ts index 3fcd228..35f91b4 100644 --- a/src/websocket.ts +++ b/src/websocket.ts @@ -74,11 +74,11 @@ import { GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, + LeaveAdmin, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, - TransferSite, } from "./interfaces/api/site"; import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket"; import { UserOperation } from "./interfaces/others"; @@ -389,10 +389,10 @@ export class LemmyWebsocket { } /** - * Transfer your site to another user. + * Leave the Site admins. */ - transferSite(form: TransferSite) { - return wrapper(UserOperation.TransferSite, form); + leaveAdmin(form: LeaveAdmin) { + return wrapper(UserOperation.LeaveAdmin, form); } /**