mirror of
https://github.com/documize/community.git
synced 2025-08-05 13:35:25 +02:00
EmberJS: FolderID to SpaceID
Co-Authored-By: Harvey Kandola <harvey@documize.com>
This commit is contained in:
parent
66d5e73ed1
commit
e0457b40da
45 changed files with 170 additions and 99 deletions
|
@ -121,16 +121,16 @@ func (h *Handler) GetBySpace(w http.ResponseWriter, r *http.Request) {
|
|||
method := "block.space"
|
||||
ctx := domain.GetRequestContext(r)
|
||||
|
||||
folderID := request.Param(r, "folderID")
|
||||
if len(folderID) == 0 {
|
||||
response.WriteMissingDataError(w, method, "folderID")
|
||||
spaceID := request.Param(r, "spaceID")
|
||||
if len(spaceID) == 0 {
|
||||
response.WriteMissingDataError(w, method, "spaceID")
|
||||
return
|
||||
}
|
||||
|
||||
var b []block.Block
|
||||
var err error
|
||||
|
||||
b, err = h.Store.Block.GetBySpace(ctx, folderID)
|
||||
b, err = h.Store.Block.GetBySpace(ctx, spaceID)
|
||||
|
||||
if len(b) == 0 {
|
||||
b = []block.Block{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue