core/server/controllers/frontend.js
/**
 * formats variables for handlebars in multi-post contexts.
 * If extraValues are available, they are merged in the final value
 * @return {Object} containing page variables
 */
formats variables for handlebars in multi-post contexts.
If extraValues are available, they are merged in the final value
@return {Object} containing page variables
formats variables for handlebars in multi - post contexts . If extraValues are available they are merged in the final value @return { Object } containing page variables
function formatPageResponse(posts, page, extraValues) {
    posts = _.each(posts, function (post) {
        if (post.author) {
            delete post.author.email;
        }
        return post;
    });
    extraValues = extraValues || {};
    var resp = {
        posts: posts,
        pagination: page.meta.pagination
    };
    return _.extend(resp, extraValues);
}
function formatPageResponse ( posts , page , extraValues ) { posts = _ . each ( posts , function ( post ) { if ( post . author ) { delete post . author . email ; } return post ; } ) ; extraValues = extraValues || { } ; var resp = { posts : posts , pagination : page . meta . pagination } ; return _ . extend ( resp , extraValues ) ; }
formats variables for handlebars in multi-post contexts.
formats variables for handlebars in multi - post contexts .
// Delete email from author for frontend output // TODO: do this on API level if no context is available