Ghost/core/frontend/services/routing/helpers/render-entry.js
Sam Lord 35e51e364b Switch to @tryghost/debug, remove ghost-ignition
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.
2021-06-15 17:24:22 +01:00

19 lines
589 B
JavaScript

const debug = require('@tryghost/debug')('services:routing:helpers:render-post');
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 renderEntry(req, res) {
debug('renderEntry called');
return function renderEntryClosure(entry) {
// Format data 2 - 1 is in preview/entry
// Render
return renderer(req, res, formatResponse.entry(entry));
};
};