From 8dfd5a9b7d90d9d377ca65484e09af265886a626 Mon Sep 17 00:00:00 2001 From: Qin Guan Date: Sat, 23 Sep 2023 12:01:08 +0800 Subject: [PATCH] fix: user delete --- server/api/user/[id].delete.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/api/user/[id].delete.ts b/server/api/user/[id].delete.ts index 117f138..1a0d309 100644 --- a/server/api/user/[id].delete.ts +++ b/server/api/user/[id].delete.ts @@ -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), )