[#13] Fix: Secrets in MEM store were instantly expired

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-01-26 16:53:34 +01:00
parent 9b9b9f4567
commit 8feb2653ce
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -41,7 +41,7 @@ func (s storageMem) ReadAndDestroy(id string) (string, error) {
defer delete(s.store, id) defer delete(s.store, id)
if secret.Expiry.Before(time.Now()) { if !secret.Expiry.IsZero() && secret.Expiry.Before(time.Now()) {
return "", errSecretNotFound return "", errSecretNotFound
} }