mirror of
https://github.com/wassname/talk.git
synced 2026-08-06 13:41:02 +08:00
More refactor
This commit is contained in:
@@ -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
-1
@@ -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';
|
||||
+1
-1
@@ -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 {
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user