Alert if banned

This commit is contained in:
Tarrgon
2025-05-30 13:49:05 -04:00
parent 3135ec7415
commit 50945f297e
2 changed files with 20 additions and 7 deletions
+5
View File
@@ -57,4 +57,9 @@ export function hasBlacklistedTags(post: E621Post): boolean {
export function getPostUrl(post: E621Post): string {
if (post.rating == 's') return `${config.E926_BASE_URL}/post/${post.id}`;
return `${config.E621_BASE_URL}/post/${post.id}`;
}
export async function userIsBanned(idOrName: string | number): Promise<boolean> {
const user = await getE621User(idOrName);
return user?.is_banned ?? false;
}