UNPKG

@loftysoul/soul

Version:

The professional Content Management System, based ghost

29 lines (23 loc) 649 B
const debug = require('ghost-ignition').debug('api:v2:utils:serializers:output:notifications'); module.exports = { all(response, apiConfig, frame) { debug('all'); if (!response) { return; } if (!response || !response.length) { frame.response = { notifications: [] }; return; } response.forEach((notification) => { delete notification.seen; delete notification.seenBy; delete notification.addedAt; }); frame.response = { notifications: response }; } };