MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / appGetCollection

Method appGetCollection

internal/server/app_api_read.go:256–262  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

254}
255
256func (s *Server) appGetCollection(w http.ResponseWriter, r *http.Request) {
257 c, ok := s.appVisibleCollection(w, r, chi.URLParam(r, "collSlug"))
258 if !ok {
259 return
260 }
261 writeAppJSON(w, http.StatusOK, s.appCollectionDTO(c))
262}
263
264// appItemDTOs builds the item DTOs, etag and app metadata included.
265func (s *Server) appItemDTOs(r *http.Request, items []models.Item, c *models.Collection) ([]AppItem, error) {

Callers

nothing calls this directly

Calls 3

appVisibleCollectionMethod · 0.95
appCollectionDTOMethod · 0.95
writeAppJSONFunction · 0.85

Tested by

no test coverage detected