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 = {