Add LocalSite.registration_mode (#96)

This commit is contained in:
Nutomic 2022-12-29 15:51:34 +01:00 committed by GitHub
parent 0b6e2af513
commit f3dd61731f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,16 +103,21 @@ export class Site {
instance_id: number; instance_id: number;
} }
export enum RegistrationMode {
Closed = "closed",
RequireApplication = "require_application",
Open = "open",
}
export class LocalSite { export class LocalSite {
id: number; id: number;
site_id: number; site_id: number;
site_setup: boolean; site_setup: boolean;
enable_downvotes: boolean; enable_downvotes: boolean;
open_registration: boolean; registration_mode: RegistrationMode;
enable_nsfw: boolean; enable_nsfw: boolean;
community_creation_admin_only: boolean; community_creation_admin_only: boolean;
require_email_verification: boolean; require_email_verification: boolean;
require_application: boolean;
@Transform(({ value }) => toOption(value), { toClassOnly: true }) @Transform(({ value }) => toOption(value), { toClassOnly: true })
@Transform(({ value }) => toUndefined(value), { toPlainOnly: true }) @Transform(({ value }) => toUndefined(value), { toPlainOnly: true })
@Expose() @Expose()