File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
back/src/domains/booking/service Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Redis from 'ioredis';
55
66import { AuthService } from '../../../auth/service/auth.service' ;
77import { UserService } from '../../user/service/user.service' ;
8+ import { IN_BOOKING_DEFAULT_MAX_SIZE } from '../const/inBookingDefaultMaxSize.const' ;
89
910type InBookingSession = {
1011 sid : string ;
@@ -26,7 +27,11 @@ export class InBookingService {
2627 }
2728
2829 async getInBookingSessionsDefaultMaxSize ( ) {
29- return parseInt ( await this . redis . get ( 'in-booking:default-max-size' ) ) ;
30+ const defaultMaxSizeData = await this . redis . get ( 'in-booking:default-max-size' ) ;
31+ if ( defaultMaxSizeData ) {
32+ return parseInt ( defaultMaxSizeData ) ;
33+ }
34+ return IN_BOOKING_DEFAULT_MAX_SIZE ;
3035 }
3136
3237 async setInBookingSessionsDefaultMaxSize ( size : number ) {
You can’t perform that action at this time.
0 commit comments