refactor: 💡 Fix mirage data (#147)

This commit is contained in:
Zhihe Li authored and GitHub committed 2023-03-23 16:18:45 -04:00
1 parent 458fd167e3
commit d503b614bc
1 file changed
+10 -7
+10 -7
View File
@@ -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 } }) => {