From 34cd26781bd0f59adf20f686b6b09aeac0bd25c5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 13 Jan 2023 10:26:05 +0000 Subject: [PATCH] Delete instead of deactivating --- packages/server/src/api/controllers/user.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/server/src/api/controllers/user.ts b/packages/server/src/api/controllers/user.ts index f37af55ee0..5458d97f76 100644 --- a/packages/server/src/api/controllers/user.ts +++ b/packages/server/src/api/controllers/user.ts @@ -189,16 +189,11 @@ export async function removeUserFromApp(ctx: BBContext) { try { metadata = await db.get(metadataId) } catch (err) { + console.warn(`User cannot be found in the app`, { userId, appId }) return } - let combined = { - ...metadata, - status: constants.UserStatus.INACTIVE, - metadata: rolesCore.BUILTIN_ROLE_IDS.PUBLIC, - } - - await db.put(combined) + await db.remove(metadata) }) } ctx.body = {