Redirect to /unread when getting a 404 for an unread expired entry

Hosted miniflux don't keep read entries for long. If I leave my PC at
home on an unread entry, read everything pending at work and get back
to home later, when I click "next", I get a bare 404 error. I have to
go back to /unread myself. I think it would be more user friendly (but
maybe a bit suprising) to go directly to /unread in this case.
This commit is contained in:
Vincent Bernat 2020-01-24 09:10:47 +01:00 committed by Frédéric Guillot
parent 476898b1d4
commit 15727f716a
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func (h *handler) showUnreadEntryPage(w http.ResponseWriter, r *http.Request) {
}
if entry == nil {
html.NotFound(w, r)
html.Redirect(w, r, route.Path(h.router, "unread"))
return
}