More refactor

This commit is contained in:
Chi Vinh Le
2018-01-29 20:52:44 +01:00
parent c355e10453
commit 0799e9d8ee
9 changed files with 5 additions and 3 deletions
@@ -9,7 +9,7 @@ import AutomaticAssetClosure from '../containers/AutomaticAssetClosure';
import ExtendableTabPanel from '../containers/ExtendableTabPanel';
import { Tab, TabPane } from 'coral-ui';
import ProfileContainer from 'coral-settings/containers/ProfileContainer';
import ProfileContainer from '../tabs/profile/containers/ProfileContainer';
import Popup from 'coral-framework/components/Popup';
import IfSlotIsNotEmpty from 'coral-framework/components/IfSlotIsNotEmpty';
import cn from 'classnames';
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Icon } from '../coral-ui';
import { Icon } from 'coral-ui';
import styles from './Comment.css';
import Slot from 'coral-framework/components/Slot';
import CommentTimestamp from 'coral-framework/components/CommentTimestamp';
@@ -8,7 +8,7 @@ import cn from 'classnames';
import { link } from 'coral-framework/services/pym';
import NotLoggedIn from '../components/NotLoggedIn';
import { Spinner } from 'coral-ui';
import CommentHistory from 'talk-plugin-history/CommentHistory';
import CommentHistory from '../components/CommentHistory';
// TODO: Auth logic needs refactoring.
import {
+2
View File
@@ -84,6 +84,7 @@ module.exports = class CommentsService {
* @param {String} status the new Comment status
*/
static async edit({ id, author_id, body, status }) {
console.log(status);
const EDITABLE_STATUSES = ['NONE', 'PREMOD', 'ACCEPTED'];
const query = {
@@ -209,6 +210,7 @@ module.exports = class CommentsService {
await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment);
console.log(editedComment);
return editedComment;
}