Files
talk/plugins/talk-plugin-rte/server/hooks.js
T
2018-02-22 08:59:21 -03:00

27 lines
488 B
JavaScript

const { merge } = require('lodash');
module.exports = {
RootMutation: {
createComment: {
async pre(_, { input }, _context, _info) {
input.metadata = merge(
{},
{
htmlBody: input.htmlBody,
}
);
},
},
editComment: {
async pre(_, { edit }, _context, _info) {
edit.metadata = merge(
{},
{
htmlBody: edit.htmlBody,
}
);
},
},
},
};