/album is Server side renderable

This commit is contained in:
tmshv committed 2017-05-23 01:54:29 +03:00
1 parent c2a457eea7
commit b829885b00
5 files changed
+70 -29

No files matched your search

-13
View File
@@ -6,7 +6,6 @@ import {json} from './';
export default function () {
return compose([
gallery(),
album()
]);
};
@@ -30,18 +29,6 @@ function gallery() {
));
}
function album() {
return route.get('/album/:id', json(
async(ctx, id) => {
let record = await c('albums').findOne({
id: id
});
record = await processAlbum(record);
ctx.body = record;
}
));
}
const processAlbum = async album => {
album.url = `/album/${album.id}`;