perf: 支持约课以及消息推送能力
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Body,
|
||||
Param,
|
||||
Query,
|
||||
Post,
|
||||
UseGuards,
|
||||
} from '@nestjs/common'
|
||||
import { UserRole, CardTypeCategory } from '@mp-pilates/shared'
|
||||
@@ -16,6 +17,7 @@ import { CurrentUser } from '../common/decorators/current-user.decorator'
|
||||
import { UserService } from './user.service'
|
||||
import { UpdateProfileDto } from './dto/update-profile.dto'
|
||||
import { UpdateUserMembershipDto } from './dto/update-user-membership.dto'
|
||||
import { ReportSubscriptionMessageRequestDto } from './dto/report-subscription-message.dto'
|
||||
|
||||
const VALID_CARD_TYPES = new Set<string>(Object.values(CardTypeCategory))
|
||||
|
||||
@@ -42,6 +44,19 @@ export class UserController {
|
||||
return this.userService.getStats(userId)
|
||||
}
|
||||
|
||||
@Get('user/subscription-messages/templates')
|
||||
getSubscriptionMessageTemplates() {
|
||||
return this.userService.getSubscriptionMessageTemplates()
|
||||
}
|
||||
|
||||
@Post('user/subscription-messages/report')
|
||||
reportSubscriptionMessageRequests(
|
||||
@CurrentUser('sub') userId: string,
|
||||
@Body() dto: ReportSubscriptionMessageRequestDto,
|
||||
) {
|
||||
return this.userService.reportSubscriptionMessageRequests(userId, dto.requests)
|
||||
}
|
||||
|
||||
// ─── Admin: Member Management ─────────────────────────────────────────────
|
||||
|
||||
@Get('admin/members')
|
||||
|
||||
Reference in New Issue
Block a user