From a02ad695683bcde2c4b78b4a9f3d9935be975f57 Mon Sep 17 00:00:00 2001 From: gaba Date: Tue, 3 Jan 2017 09:36:20 -0300 Subject: [PATCH] Adds specific fields to the metadata in the action when flagging because suspect word. --- routes/api/comments/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api/comments/index.js b/routes/api/comments/index.js index 39b4b02bc..21426d217 100644 --- a/routes/api/comments/index.js +++ b/routes/api/comments/index.js @@ -137,7 +137,7 @@ router.post('/', wordlist.filter('body'), (req, res, next) => { .then((comment) => { if (req.wordlist.suspect) { return Comment - .addAction(comment.id, null, 'flag', 'body', 'Matched suspect word filters.') + .addAction(comment.id, null, 'flag', {field: 'body', details: 'Matched suspect word filters.'}) .then(() => comment); }