Skip to content

Commit

Permalink
feat: change Before to After
Browse files Browse the repository at this point in the history
Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
  • Loading branch information
J0 and kangmingtay committed Mar 26, 2024
1 parent d01afaa commit 7c2dc8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ func validateEmail(email string) (string, error) {
}

func validateSentWithinFrequencyLimit(sentAt *time.Time, frequency time.Duration) error {
if sentAt != nil && !sentAt.Add(frequency).Before(time.Now()) {
if sentAt != nil && sentAt.Add(frequency).After(time.Now()) {
return MaxFrequencyLimitError
}
return nil
Expand Down

0 comments on commit 7c2dc8e

Please sign in to comment.