mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
13 lines
446 B
JavaScript
13 lines
446 B
JavaScript
|
const debug = require('ghost-ignition').debug('services:routing:helpers:render-collection'),
|
||
|
formatResponse = require('./format-response'),
|
||
|
renderer = require('./renderer');
|
||
|
|
||
|
module.exports = function renderCollection(req, res) {
|
||
|
debug('renderCollection called');
|
||
|
return function renderCollection(result) {
|
||
|
// Format data 2
|
||
|
// Render
|
||
|
return renderer(req, res, formatResponse.collection(result));
|
||
|
};
|
||
|
};
|