diff --git a/src/app/api/[[...slugs]]/_lib/user/updt.ts b/src/app/api/[[...slugs]]/_lib/user/updt.ts index 97bb8d96..61e7ec59 100644 --- a/src/app/api/[[...slugs]]/_lib/user/updt.ts +++ b/src/app/api/[[...slugs]]/_lib/user/updt.ts @@ -35,13 +35,6 @@ export default async function userUpdate(context: Context) { const isActiveChanged = isActive !== undefined && currentUser.isActive !== isActive; - // ✅ Jika role berubah, hapus semua akses menu yang ada - if (isRoleChanged) { - await prisma.userMenuAccess.deleteMany({ - where: { userId: id } - }); - } - // ✅ Jika role berubah, reset dan set ulang akses menu if (isRoleChanged && roleId) { // Hapus akses lama @@ -63,8 +56,6 @@ export default async function userUpdate(context: Context) { } } - - // Update user const updatedUser = await prisma.user.update({ where: { id },