mirror of
https://github.com/documize/community.git
synced 2025-07-21 22:29:41 +02:00
changed delete page to use DELETE verb and more Ember idiomatic
This commit is contained in:
parent
e9def2e71f
commit
0655fab204
6 changed files with 24 additions and 23 deletions
|
@ -23,8 +23,8 @@ import (
|
|||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/utility"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
@ -287,7 +287,7 @@ func DeleteDocumentPage(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
pageID := params["pageID"]
|
||||
|
||||
if len(documentID) == 0 {
|
||||
if len(pageID) == 0 {
|
||||
writeMissingDataError(w, method, "pageID")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ func init() {
|
|||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages", []string{"GET", "OPTIONS"}, nil, GetDocumentPages))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages/{pageID}", []string{"PUT", "OPTIONS"}, nil, UpdateDocumentPage))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages/{pageID}", []string{"DELETE", "OPTIONS"}, nil, DeleteDocumentPage))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages/{pageID}", []string{"POST", "OPTIONS"}, nil, DeleteDocumentPages))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages", []string{"DELETE", "OPTIONS"}, nil, DeleteDocumentPages))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages/{pageID}", []string{"GET", "OPTIONS"}, nil, GetDocumentPage))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/pages", []string{"POST", "OPTIONS"}, nil, AddDocumentPage))
|
||||
log.IfErr(Add(RoutePrefixPrivate, "documents/{documentID}/attachments", []string{"GET", "OPTIONS"}, nil, GetAttachments))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue