temp
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { User } from '@/models/user.ts';
|
||||
import { UserServices } from '@/models/user.ts';
|
||||
|
||||
import { app } from '@/app.ts';
|
||||
|
||||
@@ -12,7 +12,7 @@ app
|
||||
if (!password) {
|
||||
ctx.throw(500, 'root password are required');
|
||||
}
|
||||
const res = await User.initializeUser(password);
|
||||
const res = await UserServices.initializeUser(password);
|
||||
ctx.body = res;
|
||||
})
|
||||
.addTo(app);
|
||||
@@ -28,7 +28,7 @@ app
|
||||
if (!username && username.startsWith('demo')) {
|
||||
ctx.throw(500, 'username are required, and must start with demo');
|
||||
}
|
||||
const res = await User.createDemoUser(username, password);
|
||||
const res = await UserServices.createDemoUser(username, password);
|
||||
ctx.body = res;
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
Reference in New Issue
Block a user