Fix Ganti Role, ganti role menunya sudah menyesuaikan

This commit is contained in:
2025-11-28 15:03:18 +08:00
parent 83fb39a957
commit 0018bdc251

View File

@@ -60,6 +60,7 @@ export default async function userUpdate(context: Context) {
},
});
// ✅ HAPUS SEMUA SESI USER DI DATABASE
if (isRoleChanged) {
await prisma.userSession.deleteMany({ where: { userId: id } });