refactor(User): rename createAdminUser with createAdmin
This commit is contained in:
@@ -4,7 +4,7 @@ import Config from '../../../../../models/config.js';
|
|||||||
export default async (request, response) => {
|
export default async (request, response) => {
|
||||||
const { email, password, fullName } = request.body;
|
const { email, password, fullName } = request.body;
|
||||||
|
|
||||||
await User.createAdminUser({ email, password, fullName });
|
await User.createAdmin({ email, password, fullName });
|
||||||
|
|
||||||
await Config.markInstallationCompleted();
|
await Config.markInstallationCompleted();
|
||||||
|
|
||||||
|
@@ -373,7 +373,7 @@ class User extends Base {
|
|||||||
return apps;
|
return apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async createAdminUser({ email, password, fullName }) {
|
static async createAdmin({ email, password, fullName }) {
|
||||||
const adminRole = await Role.findAdmin();
|
const adminRole = await Role.findAdmin();
|
||||||
|
|
||||||
const adminUser = await this.query().insert({
|
const adminUser = await this.query().insert({
|
||||||
|
Reference in New Issue
Block a user