Resolve linter issues

This commit is contained in:
Chi Vinh Le
2018-06-05 04:28:54 +02:00
parent d9a1d739dc
commit ccff6ed63b
148 changed files with 1171 additions and 265 deletions
+23 -5
View File
@@ -14,7 +14,10 @@ const {
} = require('../../perms/constants');
const resolveTagsForComment = async (ctx, { asset_id, tags = [] }) => {
const { user, loaders: { Tags } } = ctx;
const {
user,
loaders: { Tags },
} = ctx;
const item_type = 'COMMENTS';
// Handle Tags
@@ -156,7 +159,11 @@ const createComment = async (
metadata = {},
}
) => {
const { user, loaders: { Comments }, pubsub } = ctx;
const {
user,
loaders: { Comments },
pubsub,
} = ctx;
// Resolve the tags for the comment.
tags = await resolveTagsForComment(ctx, { asset_id, tags });
@@ -202,7 +209,11 @@ const createComment = async (
* @return {Promise} resolves to a new comment
*/
const createPublicComment = async (ctx, comment) => {
const { connectors: { services: { Moderation } } } = ctx;
const {
connectors: {
services: { Moderation },
},
} = ctx;
// We then take the wordlist and the comment into consideration when
// considering what status to assign the new comment, and resolve the new
@@ -245,7 +256,10 @@ const createActions = async (item_id, actions = []) =>
* @param {String} status the new status of the comment
*/
const setStatus = async (ctx, { id, status }) => {
const { user, loaders: { Comments } } = ctx;
const {
user,
loaders: { Comments },
} = ctx;
let comment = await CommentsService.pushStatus(
id,
@@ -281,7 +295,11 @@ const editComment = async (
ctx,
{ id, asset_id, edit: { body, metadata = {} } }
) => {
const { connectors: { services: { Moderation } } } = ctx;
const {
connectors: {
services: { Moderation },
},
} = ctx;
// Build up the new comment we're setting. We need to check this with
// moderation now.