Merge pull request #184 from LemmyNet/add_community_hide

Adding hide community. Fixes #183
This commit is contained in:
SleeplessOne1917 2023-09-18 19:51:33 -04:00 committed by GitHub
commit f439a7ceda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,7 @@ import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
import { UploadImage, UploadImageResponse, VERSION } from "./types/others"; import { UploadImage, UploadImageResponse, VERSION } from "./types/others";
import { BlockInstance } from "./types/BlockInstance"; import { BlockInstance } from "./types/BlockInstance";
import { BlockInstanceResponse } from "./types/BlockInstanceResponse"; import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
import { HideCommunity } from "./types/HideCommunity";
enum HttpType { enum HttpType {
Get = "GET", 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. * A moderator remove for a community.
* *