🐛 fix: harden backend authorization and sync

This commit is contained in:
2026-08-13 03:29:17 +07:00
parent 4d29156614
commit ab662a4fa4
35 changed files with 442 additions and 176 deletions
+8 -2
View File
@@ -4,9 +4,15 @@ export type User = PrismaUser;
export type CreateUserInput = Prisma.UserCreateInput;
export type UpdateUserInput = Prisma.UserUpdateInput;
export type UpdateUserInput = {
name?: string;
role?: "admin" | "user";
};
export type UpdateSuspensionInput = Prisma.UserUpdateInput;
export type UpdateSuspensionInput = {
isSuspended: boolean;
suspendedUntil?: Date | null;
};
export function isUserSuspended(user: Pick<PrismaUser, "isSuspended" | "suspendedUntil">): boolean {
if (!user.isSuspended) {