diff --git a/constant/checkin.constant.go b/constant/checkin.constant.go index 36af390..4a7b7ac 100644 --- a/constant/checkin.constant.go +++ b/constant/checkin.constant.go @@ -1,7 +1,7 @@ package constant -const BAAN_RESULT = "baan-result" const RPKM_CONFIRM = "confirm-rpkm" +const BAAN_RESULT = "baan-result" const RPKM_DAY_ONE = "rpkm-day-1" const RPKM_DAY_TWO = "rpkm-day-2" const FRESHY_NIGHT_CONFIRM = "freshy-night-confirm" diff --git a/internal/checkin/checkin.handler.go b/internal/checkin/checkin.handler.go index 6b2ac34..5e6b75f 100644 --- a/internal/checkin/checkin.handler.go +++ b/internal/checkin/checkin.handler.go @@ -205,6 +205,11 @@ func (h *handlerImpl) checkRegTime(event string) (bool, string) { h.log.Named("checkRegTime").Warn(fmt.Sprintf("Forbidden: RPKM67 Confirmation Registration starts at %s", h.regConf.RpkmConfirmStart)) return false, fmt.Sprintf("RPKM67 Confirmation Registration starts at %s", h.regConf.RpkmConfirmStart) } + case constant.BAAN_RESULT: + if nowGMTPlus7.Before(h.regConf.BaanResultStart) { + h.log.Named("checkRegTime").Warn(fmt.Sprintf("Forbidden: Baan Selection Result starts at %s", h.regConf.BaanResultStart)) + return false, fmt.Sprintf("Baan Selection Result starts at %s", h.regConf.BaanResultStart) + } case constant.RPKM_DAY_ONE: if nowGMTPlus7.Before(h.regConf.RpkmDayOneStart) { h.log.Named("checkRegTime").Warn(fmt.Sprintf("Forbidden: RPKM67 Day One Registration starts at %s", h.regConf.RpkmDayOneStart))