feat: 支持一键发布服务端
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user