From afaa90f0429f7a8bc8d80764445e392c80311628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lie=20DELHAIE?= Date: Tue, 29 Jul 2025 17:35:26 +0200 Subject: [PATCH] remove unused func --- cmd/server/api/responses.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/cmd/server/api/responses.go b/cmd/server/api/responses.go index e85f64c..474fc40 100644 --- a/cmd/server/api/responses.go +++ b/cmd/server/api/responses.go @@ -101,29 +101,6 @@ func unauthorized(w http.ResponseWriter, r *http.Request) { } } -func forbidden(w http.ResponseWriter, r *http.Request) { - e := obj.HTTPError{ - HTTPCore: obj.HTTPCore{ - Status: http.StatusForbidden, - Path: r.RequestURI, - Timestamp: time.Now(), - }, - Error: "Forbidden", - Message: "The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.", - } - - payload, err := json.Marshal(e) - if err != nil { - log.Println(err) - } - w.Header().Add("Content-Type", "application/json") - w.WriteHeader(http.StatusForbidden) - _, err = w.Write(payload) - if err != nil { - log.Println(err) - } -} - func ok(o interface{}, w http.ResponseWriter, r *http.Request) { e := obj.HTTPObject{ HTTPCore: obj.HTTPCore{