diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-26 08:40:30 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-26 08:40:30 +0200 |
commit | d8633d7fb89b55996f25e1a67180408c805ba15f (patch) | |
tree | 50c7b637e1f89c6ffcf8fcc7bf99429e91c944ef /api.go | |
parent | 982bd8a43c50bb5845b694dbd0b3e0ffbf43dad7 (diff) | |
download | guichet-d8633d7fb89b55996f25e1a67180408c805ba15f.tar.gz guichet-d8633d7fb89b55996f25e1a67180408c805ba15f.zip |
final
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 } |