refactor(User/createAdmin): mark installation completed
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import User from '../../../../../models/user.js';
|
||||
import Config from '../../../../../models/config.js';
|
||||
|
||||
export default async (request, response) => {
|
||||
const { email, password, fullName } = request.body;
|
||||
|
||||
await User.createAdmin({ email, password, fullName });
|
||||
|
||||
await Config.markInstallationCompleted();
|
||||
|
||||
response.status(204).end();
|
||||
};
|
||||
|
Reference in New Issue
Block a user