feat: allow administrator deletion and remove icon source field

This commit is contained in:
陈煜 committed 2026-10-05 16:44:44 +08:00
1 parent a5f1236d44
commit 2db0c75498
18 files changed
+367 -27

No files matched your search

+6
View File
@@ -9,6 +9,12 @@ export const loginInput = credentials.extend({
.max(72)
.refine((s) => Buffer.byteLength(s, 'utf8') <= 72, '密码最多 72 字节'),
});
export const adminDeleteInput = z
.object({
confirmationUsername: credentials.shape.username,
currentPassword: loginInput.shape.password,
})
.strict();
export const adminCreateInput = credentials.extend({ role: roles.default('user') }).strict();
export const adminUpdateInput = z
.object({ role: roles.optional(), banned: z.boolean().optional() })