(app *App, u *User, w http.ResponseWriter, r *http.Request)
| 756 | } |
| 757 | |
| 758 | func viewMyCollectionsAPI(app *App, u *User, w http.ResponseWriter, r *http.Request) error { |
| 759 | reqJSON := IsJSON(r) |
| 760 | if !reqJSON { |
| 761 | return ErrBadRequestedType |
| 762 | } |
| 763 | |
| 764 | p, err := app.db.GetCollections(u, app.cfg.App.Host) |
| 765 | if err != nil { |
| 766 | return err |
| 767 | } |
| 768 | |
| 769 | return impart.WriteSuccess(w, p, http.StatusOK) |
| 770 | } |
| 771 | |
| 772 | func viewArticles(app *App, u *User, w http.ResponseWriter, r *http.Request) error { |
| 773 | p, err := app.db.GetAnonymousPosts(u, 1) |
nothing calls this directly
no test coverage detected