mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-28 05:41:29 +00:00
Adding hide community. Fixes #183
This commit is contained in:
parent
e91444a611
commit
51b17fe7f9
1 changed files with 14 additions and 0 deletions
14
src/http.ts
14
src/http.ts
|
@ -136,6 +136,7 @@ import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
|||
import { UploadImage, UploadImageResponse, VERSION } from "./types/others";
|
||||
import { BlockInstance } from "./types/BlockInstance";
|
||||
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
||||
import { HideCommunity } from "./types/HideCommunity";
|
||||
|
||||
enum HttpType {
|
||||
Get = "GET",
|
||||
|
@ -345,6 +346,19 @@ export class LemmyHttp {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide a community from public view.
|
||||
*
|
||||
* `HTTP.PUT /community/hide`
|
||||
*/
|
||||
hideCommunity(form: HideCommunity) {
|
||||
return this.#wrapper<HideCommunity, CommunityResponse>(
|
||||
HttpType.Put,
|
||||
"/community/hide",
|
||||
form,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A moderator remove for a community.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue