Skip to content

Commit

Permalink
fix(Gallery): Update with fragile code to use app business logic
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed May 2, 2021
1 parent 3400e08 commit 7ede8f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions api/server/plugins/gallery/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ async function register(server) {
path: '/galleries',
options: {
tags: ['api'],
handler: async () => ({ galleries: await gallery.getGalleries() }),
handler: async () => {
const { body } = await gallery.get();
return body;
},
},
});
}

const plugin = {
register,
name: 'gallery',
version: '0.4.0',
version: '0.5.0',
};

module.exports = { plugin };
2 changes: 1 addition & 1 deletion ui/app/containers/HomePage/saga.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function* getDropboxGalleries() {

function* getCdnFolders() {
try {
const { galleries } = yield call(request, `${CDN_HOST}/galleryList`);
const { galleries } = yield call(request, `${CDN_HOST}/galleries`);
yield put(
galleriesLoadingSuccess({
cdn: galleries.map(name => ({ name, id: `cdn-${name}` })),
Expand Down

0 comments on commit 7ede8f9

Please sign in to comment.