New, Edit, and Delete was renamed to *Post.
This commit is contained in:
parent
561425b739
commit
aeead5e378
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user