Delete instead of deactivating

This commit is contained in:
Adria Navarro 2023-01-13 10:26:05 +00:00
parent 09570e26f6
commit 34cd26781b
1 changed files with 2 additions and 7 deletions

View File

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