We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6e7e6f commit c5fa731Copy full SHA for c5fa731
internal/stores/store.go
@@ -74,10 +74,9 @@ func (s *Store) GetEntryByID(id string) (*shared.Entry, error) {
74
func (s *Store) GetEntryAndIncrease(id string) (*shared.Entry, error) {
75
entry, err := s.GetEntryByID(id)
76
if err != nil {
77
- errors.Wrap(err, "could not fetch entry "+id)
78
- return nil, err
+ return nil, errors.Wrap(err, "could not fetch entry "+id)
79
}
80
- if entry.Public.Expiration != nil && time.Now().After(*entry.Public.Expiration) {
+ if entry.Public.Expiration != nil && !entry.Public.Expiration.IsZero() && time.Now().After(*entry.Public.Expiration) {
81
return nil, ErrEntryIsExpired
82
83
if err := s.storage.IncreaseVisitCounter(id); err != nil {
0 commit comments