diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index e2a31192f..a5b9a1e7d 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -659,7 +659,15 @@ function routes() { }); // storage-buckets - this.get('/storage-buckets'); + this.get( + '/storage-buckets', + ({ storageBuckets }, { queryParams: { scope_id: scopeId, recursive } }) => { + if (recursive && scopeId === 'global') { + return storageBuckets.all(); + } + return storageBuckets.where({ scopeId }); + } + ); this.get('/storage-buckets/:id'); this.del('/storage-buckets/:id'); this.patch('/storage-buckets/:id'); @@ -683,12 +691,7 @@ function routes() { ); // session recordings - this.get( - '/session-recordings', - ({ sessionRecordings }, { queryParams: { scope_id: scopeId } }) => { - return sessionRecordings.where({ scopeId }); - } - ); + this.get('/session-recordings'); this.get( '/session-recordings/:idMethod', async ({ sessionRecordings }, { params: { idMethod } }) => {