diff options
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -22,8 +22,13 @@ func handleAPIWebsiteList(w http.ResponseWriter, r *http.Request) { } if r.Method == http.MethodGet { + describe, err := ctrl.Describe() + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } + w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(ctrl.Describe()) + json.NewEncoder(w).Encode(describe) return } |