perf: 优化订阅刷新逻辑
This commit is contained in:
@@ -16,6 +16,7 @@ import { Roles } from '../auth/roles.decorator'
|
||||
import { CurrentUser } from '../common/decorators/current-user.decorator'
|
||||
import { BookingService } from './booking.service'
|
||||
import { CreateBookingDto } from './dto/create-booking.dto'
|
||||
import { AdminArrangeBookingDto } from './dto/admin-arrange-booking.dto'
|
||||
|
||||
@Controller()
|
||||
export class BookingController {
|
||||
@@ -92,6 +93,16 @@ export class BookingController {
|
||||
)
|
||||
}
|
||||
|
||||
@Post('admin/bookings')
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles(UserRole.ADMIN)
|
||||
async arrangeBooking(
|
||||
@CurrentUser('sub') operatorId: string,
|
||||
@Body() dto: AdminArrangeBookingDto,
|
||||
) {
|
||||
return this.bookingService.adminArrangeBooking(operatorId, dto)
|
||||
}
|
||||
|
||||
@Get('admin/teaching-schedule')
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles(UserRole.ADMIN)
|
||||
|
||||
Reference in New Issue
Block a user