/album is Server side renderable
This commit is contained in:
1 parent
c2a457eea7
commit
b829885b00
5 files changed
+70
-29
No files matched your search
@@ -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}`;
|
||||
|
||||
|
||||
Reference in new issue
Block a user