Enabling metadata for comment edition

This commit is contained in:
okbel
2018-02-22 10:34:22 -03:00
parent 6f6fe69129
commit 4579537709
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -264,7 +264,7 @@ const setStatus = async ({ user, loaders: { Comments } }, { id, status }) => {
* @param {Object} edit describes how to edit the comment
* @param {String} edit.body the new Comment body
*/
const edit = async (ctx, { id, asset_id, edit: { body } }) => {
const edit = async (ctx, { id, asset_id, edit: { body, metadata = {} } }) => {
const { connectors: { services: { Moderation } } } = ctx;
// Build up the new comment we're setting. We need to check this with
@@ -280,6 +280,7 @@ const edit = async (ctx, { id, asset_id, edit: { body } }) => {
author_id: ctx.user.id,
body,
status,
metadata,
});
// Create all the actions that were determined during the moderation check