MCPcopy
hub / github.com/shadow1ng/fscan / List

Method List

web/api/project.go:211–217  ·  view source on GitHub ↗

List 列出所有项目

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

209
210// List 列出所有项目
211func (h *ProjectHandler) List(w http.ResponseWriter, r *http.Request) {
212 if r.Method != http.MethodGet {
213 http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
214 return
215 }
216 writeJSON(w, http.StatusOK, h.store.List())
217}
218
219// Create 创建项目
220func (h *ProjectHandler) Create(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 3

writeJSONFunction · 0.85
ErrorMethod · 0.45
ListMethod · 0.45

Tested by

no test coverage detected