temp 更新

This commit is contained in:
2025-03-06 18:32:14 +08:00
parent fe6ce9f97e
commit b5fc5d279e
6 changed files with 52 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
import { UserServices } from '@/models/user.ts';
import { User } 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 UserServices.initializeUser(password);
const res = await User.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 UserServices.createDemoUser(username, password);
const res = await User.createDemoUser(username, password);
ctx.body = res;
})
.addTo(app);