fix(api): remove unused 'deleted' variable in staff DELETE handler
The transaction callback returns [guardError, deleted] but only guardError is consumed. Destructure only what we need. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -158,7 +158,7 @@ staffRouter.delete("/:id", async (c) => {
|
||||
}
|
||||
|
||||
// Prevent deleting the last super user — use transaction to avoid race
|
||||
const [guardError, deleted] = await db.transaction(async (tx) => {
|
||||
const [guardError] = await db.transaction(async (tx) => {
|
||||
const [targetStaff] = await tx
|
||||
.select({ isSuperUser: staff.isSuperUser })
|
||||
.from(staff)
|
||||
|
||||
Reference in New Issue
Block a user