diff --git a/internal/http/api_handlers.go b/internal/http/api_handlers.go index ef93634..e5a26db 100644 --- a/internal/http/api_handlers.go +++ b/internal/http/api_handlers.go @@ -220,7 +220,7 @@ func NewMindflowApiHandlers(db mindflow.Mindflow) *MindflowApiHandlers { return &MindflowApiHandlers{db: db} } -func (h *MindflowApiHandlers) New(w http.ResponseWriter, r *http.Request) { +func (h *MindflowApiHandlers) NewPost(w http.ResponseWriter, r *http.Request) { var post *mindflow.Post var err error @@ -252,7 +252,7 @@ func (h *MindflowApiHandlers) New(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/mindflow/admin", http.StatusMovedPermanently) } -func (h *MindflowApiHandlers) Edit(w http.ResponseWriter, r *http.Request) { +func (h *MindflowApiHandlers) EditPost(w http.ResponseWriter, r *http.Request) { var post *mindflow.Post var err error @@ -294,7 +294,7 @@ func (h *MindflowApiHandlers) Edit(w http.ResponseWriter, r *http.Request) { } } -func (h *MindflowApiHandlers) Delete(w http.ResponseWriter, r *http.Request) { +func (h *MindflowApiHandlers) DeletePost(w http.ResponseWriter, r *http.Request) { id, _ := strconv.ParseInt(GetURLParam(r, "id"), 10, 64) if err := h.db.DeletePost(id); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)