(app *App, w http.ResponseWriter, r *http.Request)
| 143 | } |
| 144 | |
| 145 | func viewLocalTimeline(app *App, w http.ResponseWriter, r *http.Request) error { |
| 146 | if !app.cfg.App.LocalTimeline { |
| 147 | return impart.HTTPError{http.StatusNotFound, "Page doesn't exist."} |
| 148 | } |
| 149 | |
| 150 | vars := mux.Vars(r) |
| 151 | var p int |
| 152 | page := 1 |
| 153 | p, _ = strconv.Atoi(vars["page"]) |
| 154 | if p > 0 { |
| 155 | page = p |
| 156 | } |
| 157 | |
| 158 | return showLocalTimeline(app, w, r, page, vars["author"], vars["tag"]) |
| 159 | } |
| 160 | |
| 161 | // updateTimelineCache will reset and update the cache if it is stale or |
| 162 | // the boolean passed in is true. |
no test coverage detected