mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-26 06:11:14 +00:00
Merge pull request #184 from LemmyNet/add_community_hide
Adding hide community. Fixes #183
This commit is contained in:
commit
f439a7ceda
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