Remove unnecessary receiver from campsite.AdminHandler.deleteSlide
This commit is contained in:
parent
1f2ab494dd
commit
5cc5fca6b5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue