超管用户登录;

代码核销功能
This commit is contained in:
2026-07-06 22:33:30 +08:00
parent d708a10095
commit a66207ffa9
8 changed files with 203 additions and 38 deletions
@@ -1,6 +1,6 @@
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
import { AuthService } from './auth.service';
import { LoginSmsDto, SendSmsDto } from './dto/auth.dto';
import { LoginPasswordDto, LoginSmsDto, SendSmsDto } from './dto/auth.dto';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
import { CurrentUser } from '../../common/decorators/current-user.decorator';
import { AuthUser } from '../../common/guards/jwt-auth.guard';
@@ -20,6 +20,11 @@ export class AdminAuthController {
return this.authService.loginHq(dto.phone, dto.code, ClientApp.HQ_WEB);
}
@Post('login/password')
loginPassword(@Body() dto: LoginPasswordDto) {
return this.authService.loginHqPassword(dto.loginName, dto.password, ClientApp.HQ_WEB);
}
@Get('me')
@UseGuards(JwtAuthGuard)
me(@CurrentUser() user: AuthUser) {