Merge pull request #1305 from automatisch/fix-user-creation
fix: use default role for fallback user creation
This commit is contained in:
@@ -36,7 +36,7 @@ const createUser = async (_parent: unknown, params: Params, context: Context) =>
|
||||
userPayload.roleId = params.input.role.id;
|
||||
} catch {
|
||||
// void
|
||||
const role = await Role.query().findOne({ key: 'user' });
|
||||
const role = await Role.query().findOne({ key: 'admin' });
|
||||
userPayload.roleId = role.id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user