Skip to content

Commit

Permalink
check reg time
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jul 22, 2024
1 parent b8e3a80 commit 7630af8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/group/group.handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ func (h *handlerImpl) checkRegTime() bool {
if nowGMTPlus7.Before(h.regConf.RpkmStart) {
h.log.Named("checkRegTime").Warn("Forbidden: Registration hasn't started")
return false
} else if nowGMTPlus7.After(h.regConf.RpkmEnd) {
h.log.Named("checkRegTime").Warn("Forbidden: Registration has ended")
return false
}

return true
Expand Down
3 changes: 3 additions & 0 deletions internal/selection/selection.handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ func (h *handlerImpl) checkRegTime() bool {
if nowGMTPlus7.Before(h.regConf.RpkmStart) {
h.log.Named("checkRegTime").Warn("Forbidden: Registration hasn't started")
return false
} else if nowGMTPlus7.After(h.regConf.RpkmEnd) {
h.log.Named("checkRegTime").Warn("Forbidden: Registration has ended")
return false
}

return true
Expand Down

0 comments on commit 7630af8

Please sign in to comment.