Delete instead of deactivating
This commit is contained in:
parent
09570e26f6
commit
34cd26781b
|
@ -189,16 +189,11 @@ export async function removeUserFromApp(ctx: BBContext) {
|
||||||
try {
|
try {
|
||||||
metadata = await db.get(metadataId)
|
metadata = await db.get(metadataId)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.warn(`User cannot be found in the app`, { userId, appId })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let combined = {
|
await db.remove(metadata)
|
||||||
...metadata,
|
|
||||||
status: constants.UserStatus.INACTIVE,
|
|
||||||
metadata: rolesCore.BUILTIN_ROLE_IDS.PUBLIC,
|
|
||||||
}
|
|
||||||
|
|
||||||
await db.put(combined)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
|
|
Loading…
Reference in New Issue