add back else clause

Add back else clause after realizing the error check doesn't return after logging.
pull/384/head
Colin Axner 4 years ago
parent 30fc088cec
commit fcf01a6039
  1. 5
      read.go

@ -171,13 +171,14 @@ func updateTimelineCache(tl *localTimeline, reset bool) {
postsInterfaces, err := tl.m.Get() postsInterfaces, err := tl.m.Get()
if err != nil { if err != nil {
log.Error("[READ] Unable to cache posts: %v", err) log.Error("[READ] Unable to cache posts: %v", err)
} } else {
castPosts := postsInterfaces.([]PublicPost) castPosts := postsInterfaces.([]PublicPost)
tl.posts = &castPosts tl.posts = &castPosts
} }
} }
}
func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page int, author, tag string) error { func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page int, author, tag string) error {
updateTimelineCache(app.timeline, false) updateTimelineCache(app.timeline, false)

Loading…
Cancel
Save