mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
35e51e364b
no issue The only pieces of Ghost-Ignition used in Ghost were debug and logging. Both of these modules have been superceded by the Framework monorepo, and all usages of Ignition have now been removed, replaced with @tryghost/debug and @tryghost/logging.
20 lines
579 B
JavaScript
20 lines
579 B
JavaScript
const debug = require('@tryghost/debug')('services:routing:helpers:render-entries');
|
|
const formatResponse = require('./format-response');
|
|
const renderer = require('./renderer');
|
|
|
|
/**
|
|
* @description Helper to handle rendering multiple resources.
|
|
*
|
|
* @param {Object} req
|
|
* @param {Object} res
|
|
* @returns {Closure)
|
|
*/
|
|
module.exports = function renderEntries(req, res) {
|
|
debug('renderEntries called');
|
|
return function renderEntriesClosure(result) {
|
|
// Format data 2
|
|
// Render
|
|
return renderer(req, res, formatResponse.entries(result));
|
|
};
|
|
};
|