feat: 支持一键发布服务端

This commit is contained in:
richarjiang
2026-04-04 15:39:26 +08:00
parent 2b3b636c54
commit 982e569fa3
45 changed files with 852 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ export class AuthController {
@Body() bindPhoneDto: BindPhoneDto,
): Promise<User> {
return this.authService.bindPhone(
req.user.userId,
req.user.sub,
bindPhoneDto.encryptedData,
bindPhoneDto.iv,
)

View File

@@ -6,7 +6,7 @@ import { UserRole } from '@mp-pilates/shared'
import { JwtPayload } from './auth.service'
export interface AuthenticatedUser {
userId: string
sub: string
role: UserRole
}
@@ -20,9 +20,9 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
})
}
validate(payload: JwtPayload): AuthenticatedUser {
validate(payload: JwtPayload): { sub: string; role: UserRole } {
return {
userId: payload.sub,
sub: payload.sub,
role: payload.role,
}
}