Merge pull request #1305 from automatisch/fix-user-creation

fix: use default role for fallback user creation
This commit is contained in:
Ömer Faruk Aydın
2023-09-29 10:39:29 +02:00
committed by GitHub

View File

@@ -36,7 +36,7 @@ const createUser = async (_parent: unknown, params: Params, context: Context) =>
userPayload.roleId = params.input.role.id; userPayload.roleId = params.input.role.id;
} catch { } catch {
// void // void
const role = await Role.query().findOne({ key: 'user' }); const role = await Role.query().findOne({ key: 'admin' });
userPayload.roleId = role.id; userPayload.roleId = role.id;
} }