From d8633d7fb89b55996f25e1a67180408c805ba15f Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 26 Sep 2023 08:40:30 +0200 Subject: final --- api.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'api.go') 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 } -- cgit v1.2.3