MCPcopy Index your code
hub / github.com/writefreely/writefreely / viewMyCollectionsAPI

Function viewMyCollectionsAPI

account.go:758–770  ·  view source on GitHub ↗
(app *App, u *User, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

756}
757
758func 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
772func viewArticles(app *App, u *User, w http.ResponseWriter, r *http.Request) error {
773 p, err := app.db.GetAnonymousPosts(u, 1)

Callers

nothing calls this directly

Calls 2

IsJSONFunction · 0.85
GetCollectionsMethod · 0.65

Tested by

no test coverage detected