Skip to content

Commit

Permalink
fix s.cache.Set is not checked
Browse files Browse the repository at this point in the history
  • Loading branch information
realhugn committed Sep 25, 2024
1 parent 1dd221a commit 3105c40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tinyURL/internal/service/url_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ func (s *urlService) Original(shortURL string) (string, error) {
return "", err
}

s.cache.Set(shortURL, url.Original, time.Hour*48)
err = s.cache.Set(shortURL, url.Original, time.Hour*48)
if err != nil {
return "", err
}

return url.Original, nil
}

0 comments on commit 3105c40

Please sign in to comment.