mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
06b03bbcfe
no issue - Split out 'getPostPage' & rename to fetchData - Split format response methods into own files - Split out handleError - Split out setReqCtx and rename to setRequestIsSecure - Split out theme paths - Refactor tests in index_spec.js to be more robust - Add tests to bring coverage for split file up to 100%
11 lines
334 B
JavaScript
11 lines
334 B
JavaScript
// TODO: figure out how to remove the need for this
|
|
// Add Request context parameter to the data object
|
|
// to be passed down to the templates
|
|
function setRequestIsSecure(req, data) {
|
|
(Array.isArray(data) ? data : [data]).forEach(function forEach(d) {
|
|
d.secure = req.secure;
|
|
});
|
|
}
|
|
|
|
module.exports = setRequestIsSecure;
|