aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-09-26 08:40:30 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-09-26 08:40:30 +0200
commitd8633d7fb89b55996f25e1a67180408c805ba15f (patch)
tree50c7b637e1f89c6ffcf8fcc7bf99429e91c944ef /api.go
parent982bd8a43c50bb5845b694dbd0b3e0ffbf43dad7 (diff)
downloadguichet-d8633d7fb89b55996f25e1a67180408c805ba15f.tar.gz
guichet-d8633d7fb89b55996f25e1a67180408c805ba15f.zip
final
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
}