Refactor templates, refresh design a bit
This commit is contained in:
parent
46ab5fe748
commit
8edd4a4179
9 changed files with 77 additions and 70 deletions
|
@ -21,7 +21,7 @@ module.exports = function(req, res) {
|
|||
var promises = [];
|
||||
|
||||
if (cache[serviceId][type + "-" + itemId]) {
|
||||
res.render(type, {items: cache[serviceId][type + "-" + itemId]});
|
||||
res.render(type, {page: type, items: cache[serviceId][type + "-" + itemId]});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ module.exports = function(req, res) {
|
|||
});
|
||||
|
||||
items.unshift(item);
|
||||
cache[serviceId][item.type + "-" + item.id] = items;
|
||||
res.render(type, {items: items});
|
||||
cache[serviceId][type + "-" + itemId] = items;
|
||||
res.render(type, {page: type, items: items});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue