aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'api.go')
-rw-r--r--api.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/api.go b/api.go
index c804276..73fd322 100644
--- a/api.go
+++ b/api.go
@@ -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
}