(app *App, w http.ResponseWriter, r *http.Request)
| 130 | } |
| 131 | |
| 132 | func viewLocalTimelineAPI(app *App, w http.ResponseWriter, r *http.Request) error { |
| 133 | updateTimelineCache(app.timeline, false) |
| 134 | |
| 135 | skip, _ := strconv.Atoi(r.FormValue("skip")) |
| 136 | |
| 137 | posts := []PublicPost{} |
| 138 | for i := skip; i < skip+tlAPIPageLimit && i < len(*app.timeline.posts); i++ { |
| 139 | posts = append(posts, (*app.timeline.posts)[i]) |
| 140 | } |
| 141 | |
| 142 | return impart.WriteSuccess(w, posts, http.StatusOK) |
| 143 | } |
| 144 | |
| 145 | func viewLocalTimeline(app *App, w http.ResponseWriter, r *http.Request) error { |
| 146 | if !app.cfg.App.LocalTimeline { |
nothing calls this directly
no test coverage detected