Skip to content

Commit

Permalink
fix: user delete
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Sep 23, 2023
1 parent ca81c07 commit 8dfd5a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/api/user/[id].delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export default defineProtectedEventHandler(async (event) => {
})
}

await event.context.database.delete(users)
await event.context.database.update(users)
.set({
firebaseId: null,
})
.where(
eq(users.id, event.context.params!.id),
)
Expand Down

0 comments on commit 8dfd5a9

Please # to comment.