|
@@ -4,6 +4,7 @@ import { LoginType, LoginVO, UPwdDTO } from '../../frame/Options';
|
|
|
import { JwtService } from '@midwayjs/jwt';
|
|
|
import { LoginRecordService } from '../../service/frame/LoginRecord.service';
|
|
|
import { RF } from '../../response/CustomerResponse';
|
|
|
+import { Validate } from '@midwayjs/validate';
|
|
|
|
|
|
@Controller('/login')
|
|
|
export class LoginController {
|
|
@@ -38,6 +39,7 @@ export class LoginController {
|
|
|
* @param data 修改密码所需数据
|
|
|
* @param type 账户类型
|
|
|
*/
|
|
|
+ @Validate()
|
|
|
@Post('/updatePwd/:type')
|
|
|
async updatePwd(@Body() data: UPwdDTO, @Param('type') type: string) {
|
|
|
await this.loginService.updatePwd(data, LoginType[type]);
|