mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
major package structure refactoring
This commit is contained in:
parent
7b8cec9a6c
commit
cf58f8164d
73 changed files with 549 additions and 389 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/utility"
|
||||
"github.com/documize/community/core/streamutil"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
|
@ -198,7 +198,7 @@ func AddBlock(w http.ResponseWriter, r *http.Request) {
|
|||
method := "AddBlock"
|
||||
p := request.GetPersister(r)
|
||||
|
||||
defer utility.Close(r.Body)
|
||||
defer streamutil.Close(r.Body)
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
|
||||
if err != nil {
|
||||
|
@ -329,7 +329,7 @@ func UpdateBlock(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
defer utility.Close(r.Body)
|
||||
defer streamutil.Close(r.Body)
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
writeBadRequestError(w, method, "Bad payload")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue