Remove unnecessary receiver from campsite.AdminHandler.deleteSlide

This commit is contained in:
jordi fita mas 2024-01-22 20:53:01 +01:00
parent 1f2ab494dd
commit 5cc5fca6b5
1 changed files with 2 additions and 2 deletions

View File

@ -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