From 5cc5fca6b5b04dac3846efb165ddc2afb7dc98ca Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Mon, 22 Jan 2024 20:53:01 +0100 Subject: [PATCH] Remove unnecessary receiver from campsite.AdminHandler.deleteSlide --- pkg/campsite/types/carousel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/campsite/types/carousel.go b/pkg/campsite/types/carousel.go index a273b2c..f1eefa8 100644 --- a/pkg/campsite/types/carousel.go +++ b/pkg/campsite/types/carousel.go @@ -77,7 +77,7 @@ func (h *AdminHandler) carouselHandler(user *auth.User, company *auth.Company, c case http.MethodPut: editSlide(w, r, user, company, conn, f) case http.MethodDelete: - h.deleteSlide(w, r, user, conn, typeSlug, mediaID) + deleteSlide(w, r, user, conn, typeSlug, mediaID) default: httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPut, http.MethodDelete) } @@ -195,7 +195,7 @@ func editSlide(w http.ResponseWriter, r *http.Request, user *auth.User, company }) } -func (h *AdminHandler) deleteSlide(w http.ResponseWriter, r *http.Request, user *auth.User, conn *database.Conn, typeSlug string, mediaId int) { +func deleteSlide(w http.ResponseWriter, r *http.Request, user *auth.User, conn *database.Conn, typeSlug string, mediaId int) { if err := user.VerifyCSRFToken(r); err != nil { http.Error(w, err.Error(), http.StatusForbidden) return