[rooms] fix staff delete

This commit is contained in:
Devin Zuczek
2026-09-22 00:08:21 -04:00
parent 2d7d37f382
commit 3bcef61c32
2 changed files with 42 additions and 3 deletions
+3 -3
View File
@@ -1858,8 +1858,7 @@ const app = new Hono<App>()
Error: 'This room does not exist!',
})
}
const isOwner = room.CreatorAccountId === accountId
if (!isOwner && !(await isStaff(c))) {
if (room.CreatorAccountId !== accountId) {
return roomResult(c, {
Success: false,
ErrorId: 'Rooms.NotOwner',
@@ -2098,7 +2097,8 @@ const app = new Hono<App>()
Error: 'This room does not exist!',
})
}
if (room.CreatorAccountId !== accountId) {
const isOwner = room.CreatorAccountId === accountId
if (!isOwner && !(await isStaff(c))) {
return roomResult(c, {
Success: false,
ErrorId: 'Rooms.NotOwner',