File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,13 @@ Collection.load = function*(args) {
201201
202202 var id = args . id ;
203203 var name = args . name ;
204+ var workspace_handle = args . workspace_handle ;
204205
205206 var criteria = { } ;
206207
207208 if ( id ) { criteria . id = id ; }
208209 if ( name ) { criteria . name = name ; }
210+ if ( workspace_handle ) { criteria . workspace_handle = workspace_handle ; }
209211
210212 var data = yield models . collections
211213 . find ( { where : criteria } )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ exports.initialize = function(app) {
2020 var data = req . body ;
2121 var user_id = api . user . id ;
2222
23- var collection = yield Collection . load ( { name : collection_name } ) ;
23+ var collection = yield Collection . load ( { name : collection_name , workspace_handle : workspace . handle } ) ;
2424
2525 if ( ! collection ) return res . json ( 404 , {
2626 message : "couldn't find collection" ,
You can’t perform that action at this time.
0 commit comments