Skip to content

Commit

Permalink
Fix: check if eventPeriod is defined in timestampValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
kmc7468 committed Sep 20, 2023
1 parent 719aad6 commit 7d54a70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lottery/middlewares/timestampValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const eventPeriod = eventConfig && {

const timestampValidator = (req, res, next) => {
if (
!eventPeriod ||
req.timestamp >= eventPeriod.endAt ||
req.timestamp < eventPeriod.startAt
) {
Expand Down

0 comments on commit 7d54a70

Please sign in to comment.