mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 14:10:29 +08:00
Merge branch '5.x' of https://e.coding.net/shancool/cool-admin/midway into 5.x
This commit is contained in:
commit
729eb94da2
@ -12,6 +12,7 @@ import { LoginDTO } from '../../dto/login';
|
||||
import { BaseSysLoginService } from '../../service/sys/login';
|
||||
import { BaseSysParamService } from '../../service/sys/param';
|
||||
import { Context } from '@midwayjs/koa';
|
||||
import { Validate } from '@midwayjs/validate';
|
||||
|
||||
/**
|
||||
* 不需要登录的后台接口
|
||||
@ -53,7 +54,8 @@ export class BaseOpenController extends BaseController {
|
||||
* @param login
|
||||
*/
|
||||
@Post('/login', { summary: '登录' })
|
||||
async login(@Body(ALL) login: LoginDTO) {
|
||||
@Validate()
|
||||
async login(@Body() login: LoginDTO) {
|
||||
return this.ok(await this.baseSysLoginService.login(login));
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,6 @@ export class LoginDTO {
|
||||
captchaId: string;
|
||||
|
||||
// 验证码
|
||||
@Rule(RuleType.string().required())
|
||||
@Rule(RuleType.required())
|
||||
verifyCode: number;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user