MCPcopy
hub / github.com/writefreely/writefreely / viewLocalTimeline

Function viewLocalTimeline

read.go:145–159  ·  view source on GitHub ↗
(app *App, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

143}
144
145func 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.

Callers 1

handleViewHomeFunction · 0.85

Calls 1

showLocalTimelineFunction · 0.85

Tested by

no test coverage detected