1
0
Fork 0
mirror of synced 2024-06-02 02:25:17 +12:00

Fixing issue which can block accessing platform - if error scenario occurs but admin user partially created.

This commit is contained in:
mike12345567 2022-07-06 16:42:38 +01:00
parent 0da424b5c6
commit 216298c74b

View file

@ -60,11 +60,13 @@ export const adminUser = async (ctx: any) => {
tenantId,
}
try {
// always bust checklist beforehand, if an error occurs but can proceed, don't get
// stuck in a cycle
await cache.bustCache(cache.CacheKeys.CHECKLIST)
const finalUser = await users.save(user, {
hashPassword,
requirePassword,
})
await cache.bustCache(cache.CacheKeys.CHECKLIST)
// events
let account: CloudAccount | undefined