@@ -26,7 +26,6 @@ import { Request } from 'express';
2626
2727import { USER_STATUS } from '../../../auth/const/userStatus.const' ;
2828import { SessionAuthGuard } from '../../../auth/guard/session.guard' ;
29- import { AuthService } from '../../../auth/service/auth.service' ;
3029import { SeatStatus } from '../const/seatStatus.enum' ;
3130import { BookingAmountReqDto } from '../dto/bookingAmountReq.dto' ;
3231import { BookingAmountResDto } from '../dto/bookingAmountRes.dto' ;
@@ -40,17 +39,18 @@ import { WaitingSseDto } from '../dto/waitingSse.dto';
4039import { BookingSeatsService } from '../service/booking-seats.service' ;
4140import { BookingService } from '../service/booking.service' ;
4241import { InBookingService } from '../service/in-booking.service' ;
42+ import { OpenBookingService } from '../service/open-booking.service' ;
4343import { WaitingQueueService } from '../service/waiting-queue.service' ;
4444
4545@Controller ( 'booking' )
4646export class BookingController {
4747 constructor (
4848 private readonly eventEmitter : EventEmitter2 ,
49- private readonly authService : AuthService ,
5049 private readonly bookingService : BookingService ,
5150 private readonly inBookingService : InBookingService ,
5251 private readonly bookingSeatsService : BookingSeatsService ,
5352 private readonly waitingQueueService : WaitingQueueService ,
53+ private readonly openBookingService : OpenBookingService ,
5454 ) { }
5555
5656 @UseGuards ( SessionAuthGuard ( ) )
@@ -183,4 +183,16 @@ export class BookingController {
183183 const setSize = await this . inBookingService . setInBookingSessionsDefaultMaxSize ( defaultMaxSize ) ;
184184 return new InBookingSizeResDto ( setSize ) ;
185185 }
186+
187+ @Post ( 'reload-open-target' )
188+ @UseGuards ( SessionAuthGuard ( USER_STATUS . ADMIN ) )
189+ @ApiOperation ( {
190+ summary : 'ADMIN: 오픈 대상 이벤트 재확인' ,
191+ description : '오픈 대상 이벤트를 다시 확인하여 오픈한다.' ,
192+ } )
193+ @ApiOkResponse ( { description : '확인 및 오픈 완료' } )
194+ @ApiUnauthorizedResponse ( { description : '인증 실패' } )
195+ async reloadOpenTarget ( ) {
196+ await this . openBookingService . checkAndOpenReservations ( ) ;
197+ }
186198}
0 commit comments