mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Removing site_creator, adding LeaveAdmin. (#42)
* Removing site_creator, adding LeaveAdmin. * v0.15.1-rc.1
This commit is contained in:
parent
7a592b9719
commit
9f4a112a18
6 changed files with 11 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "lemmy-js-client",
|
"name": "lemmy-js-client",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"version": "0.15.4-rc.2",
|
"version": "0.15.1-rc.1",
|
||||||
"author": "Dessalines <tyhou13@gmx.com>",
|
"author": "Dessalines <tyhou13@gmx.com>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|
|
@ -112,6 +112,7 @@ import {
|
||||||
GetSiteResponse,
|
GetSiteResponse,
|
||||||
GetUnreadRegistrationApplicationCount,
|
GetUnreadRegistrationApplicationCount,
|
||||||
GetUnreadRegistrationApplicationCountResponse,
|
GetUnreadRegistrationApplicationCountResponse,
|
||||||
|
LeaveAdmin,
|
||||||
ListRegistrationApplications,
|
ListRegistrationApplications,
|
||||||
ListRegistrationApplicationsResponse,
|
ListRegistrationApplicationsResponse,
|
||||||
RegistrationApplicationResponse,
|
RegistrationApplicationResponse,
|
||||||
|
@ -121,7 +122,6 @@ import {
|
||||||
Search,
|
Search,
|
||||||
SearchResponse,
|
SearchResponse,
|
||||||
SiteResponse,
|
SiteResponse,
|
||||||
TransferSite,
|
|
||||||
} from "./interfaces/api/site";
|
} from "./interfaces/api/site";
|
||||||
import { VERSION } from "./interfaces/others";
|
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<GetSiteResponse> {
|
async leaveAdmin(form: LeaveAdmin): Promise<GetSiteResponse> {
|
||||||
return this.wrapper(HttpType.Post, "/site/transfer", form);
|
return this.wrapper(HttpType.Post, "/user/leave_admin", form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -153,8 +153,7 @@ export interface MyUserInfo {
|
||||||
person_blocks: PersonBlockView[];
|
person_blocks: PersonBlockView[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TransferSite {
|
export interface LeaveAdmin {
|
||||||
person_id: number;
|
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ export enum UserOperation {
|
||||||
MarkAllAsRead,
|
MarkAllAsRead,
|
||||||
SaveUserSettings,
|
SaveUserSettings,
|
||||||
TransferCommunity,
|
TransferCommunity,
|
||||||
TransferSite,
|
LeaveAdmin,
|
||||||
DeleteAccount,
|
DeleteAccount,
|
||||||
PasswordReset,
|
PasswordReset,
|
||||||
PasswordChange,
|
PasswordChange,
|
||||||
|
|
|
@ -42,7 +42,6 @@ export interface Site {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
sidebar?: string;
|
sidebar?: string;
|
||||||
creator_id: number;
|
|
||||||
published: string;
|
published: string;
|
||||||
updated?: string;
|
updated?: string;
|
||||||
enable_downvotes: boolean;
|
enable_downvotes: boolean;
|
||||||
|
|
|
@ -74,11 +74,11 @@ import {
|
||||||
GetSite,
|
GetSite,
|
||||||
GetSiteConfig,
|
GetSiteConfig,
|
||||||
GetUnreadRegistrationApplicationCount,
|
GetUnreadRegistrationApplicationCount,
|
||||||
|
LeaveAdmin,
|
||||||
ListRegistrationApplications,
|
ListRegistrationApplications,
|
||||||
ResolveObject,
|
ResolveObject,
|
||||||
SaveSiteConfig,
|
SaveSiteConfig,
|
||||||
Search,
|
Search,
|
||||||
TransferSite,
|
|
||||||
} from "./interfaces/api/site";
|
} from "./interfaces/api/site";
|
||||||
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
||||||
import { UserOperation } from "./interfaces/others";
|
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) {
|
leaveAdmin(form: LeaveAdmin) {
|
||||||
return wrapper(UserOperation.TransferSite, form);
|
return wrapper(UserOperation.LeaveAdmin, form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue