Add URL blocklist

This commit is contained in:
flamingos-cant 2024-03-12 16:43:12 +00:00
parent c89acdd8df
commit 4988ebd51e
5 changed files with 13 additions and 0 deletions

View file

@ -140,6 +140,7 @@ export { LocalImage } from "./types/LocalImage";
export { LocalSite } from "./types/LocalSite";
export { LocalSiteId } from "./types/LocalSiteId";
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
export { LocalUser } from "./types/LocalUser";
export { LocalUserId } from "./types/LocalUserId";
export { LocalUserView } from "./types/LocalUserView";

View file

@ -44,6 +44,7 @@ export interface EditSite {
captcha_difficulty?: string;
allowed_instances?: Array<string>;
blocked_instances?: Array<string>;
blocked_urls?: Array<string>;
taglines?: Array<string>;
registration_mode?: RegistrationMode;
reports_email_admins?: boolean;

View file

@ -2,6 +2,7 @@
import type { CustomEmojiView } from "./CustomEmojiView";
import type { Language } from "./Language";
import type { LanguageId } from "./LanguageId";
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
import type { MyUserInfo } from "./MyUserInfo";
import type { PersonView } from "./PersonView";
import type { SiteView } from "./SiteView";
@ -16,4 +17,5 @@ export interface GetSiteResponse {
discussion_languages: Array<LanguageId>;
taglines: Array<Tagline>;
custom_emojis: Array<CustomEmojiView>;
blocked_urls: Array<LocalSiteUrlBlocklist>;
}

View file

@ -125,6 +125,7 @@ export type LemmyErrorType =
| { error: "couldnt_set_all_registrations_accepted" }
| { error: "couldnt_set_all_email_verified" }
| { error: "banned" }
| { error: "blocked_url" }
| { error: "couldnt_get_comments" }
| { error: "couldnt_get_posts" }
| { error: "invalid_url" }

View file

@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface LocalSiteUrlBlocklist {
id: number;
url: string;
published: string;
updated: string | null;
}