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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user