mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
Resolve linter issues
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user