Delete instead of deactivating
This commit is contained in:
parent
09570e26f6
commit
34cd26781b
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue