feat: drone.ci
This commit is contained in:
parent
07c81289bc
commit
5b2c557752
|
@ -67,6 +67,7 @@ export class UserController {
|
|||
*/
|
||||
@Post('/admin/auth')
|
||||
async AdminAuth(@Body() params: UserAdminAuthDTO) {
|
||||
try {
|
||||
const { username, password } = params;
|
||||
const token = createToken({ hasLogin: true });
|
||||
if (username === 'admin' && password === '123123') {
|
||||
|
@ -78,6 +79,10 @@ export class UserController {
|
|||
} else {
|
||||
return { code: BizCode.ERROR, msg: '用户名密码错误' };
|
||||
}
|
||||
} catch (error) {
|
||||
this.ctx.logger.error(error);
|
||||
return { code: BizCode.ERROR, msg: error };
|
||||
}
|
||||
}
|
||||
|
||||
@Get('/web/state')
|
||||
|
|
Loading…
Reference in New Issue
Block a user