Ref #28248
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
(cherry picked from commit 60d40fa99b)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
parent
23ae63913f
commit
5bb203df99
@@ -57,6 +57,11 @@ func (hs *HTTPServer) redirectFromShortURL(c *models.ReqContext) {
|
||||
return
|
||||
}
|
||||
|
||||
// Failure to update LastSeenAt should still allow to redirect
|
||||
if err := hs.ShortURLService.UpdateLastSeenAt(c.Req.Context(), shortURL); err != nil {
|
||||
hs.log.Error("Failed to update short URL last seen at", "error", err)
|
||||
}
|
||||
|
||||
hs.log.Debug("Redirecting short URL", "path", shortURL.Path)
|
||||
c.Redirect(setting.ToAbsUrl(shortURL.Path), 302)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user