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) {
201
201
202
202
var id = args . id ;
203
203
var name = args . name ;
204
+ var workspace_handle = args . workspace_handle ;
204
205
205
206
var criteria = { } ;
206
207
207
208
if ( id ) { criteria . id = id ; }
208
209
if ( name ) { criteria . name = name ; }
210
+ if ( workspace_handle ) { criteria . workspace_handle = workspace_handle ; }
209
211
210
212
var data = yield models . collections
211
213
. find ( { where : criteria } )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ exports.initialize = function(app) {
20
20
var data = req . body ;
21
21
var user_id = api . user . id ;
22
22
23
- var collection = yield Collection . load ( { name : collection_name } ) ;
23
+ var collection = yield Collection . load ( { name : collection_name , workspace_handle : workspace . handle } ) ;
24
24
25
25
if ( ! collection ) return res . json ( 404 , {
26
26
message : "couldn't find collection" ,
You can’t perform that action at this time.
0 commit comments