mirror of
https://github.com/wassname/talk.git
synced 2026-08-06 13:41:02 +08:00
chore: rename accept comment to approve comment (#2341)
This commit is contained in:
@@ -6,5 +6,5 @@ import { GQLCOMMENT_STATUS } from "coral-server/graph/tenant/schema/__generated_
|
||||
*/
|
||||
export const VISIBLE_STATUSES = [
|
||||
GQLCOMMENT_STATUS.NONE,
|
||||
GQLCOMMENT_STATUS.ACCEPTED,
|
||||
GQLCOMMENT_STATUS.APPROVED,
|
||||
];
|
||||
|
||||
@@ -305,7 +305,7 @@ export type EditCommentInput = Pick<
|
||||
const EDITABLE_STATUSES = [
|
||||
GQLCOMMENT_STATUS.NONE,
|
||||
GQLCOMMENT_STATUS.PREMOD,
|
||||
GQLCOMMENT_STATUS.ACCEPTED,
|
||||
GQLCOMMENT_STATUS.APPROVED,
|
||||
];
|
||||
|
||||
export function validateEditable(
|
||||
|
||||
@@ -23,7 +23,7 @@ export function createEmptyCommentModerationQueueCounts(): CommentModerationQueu
|
||||
|
||||
export function createEmptyCommentStatusCounts(): CommentStatusCounts {
|
||||
return {
|
||||
[GQLCOMMENT_STATUS.ACCEPTED]: 0,
|
||||
[GQLCOMMENT_STATUS.APPROVED]: 0,
|
||||
[GQLCOMMENT_STATUS.NONE]: 0,
|
||||
[GQLCOMMENT_STATUS.PREMOD]: 0,
|
||||
[GQLCOMMENT_STATUS.REJECTED]: 0,
|
||||
|
||||
@@ -38,7 +38,7 @@ export async function createStoryCountIndexes(mongo: Db) {
|
||||
* statuses.
|
||||
*/
|
||||
export interface CommentStatusCounts {
|
||||
[GQLCOMMENT_STATUS.ACCEPTED]: number;
|
||||
[GQLCOMMENT_STATUS.APPROVED]: number;
|
||||
[GQLCOMMENT_STATUS.NONE]: number;
|
||||
[GQLCOMMENT_STATUS.PREMOD]: number;
|
||||
[GQLCOMMENT_STATUS.REJECTED]: number;
|
||||
@@ -208,7 +208,7 @@ export function mergeCommentStatusCount(
|
||||
// Because the CommentStatusCounts are not indexable, it should be accessed
|
||||
// by walking the structure.
|
||||
switch (status) {
|
||||
case GQLCOMMENT_STATUS.ACCEPTED:
|
||||
case GQLCOMMENT_STATUS.APPROVED:
|
||||
case GQLCOMMENT_STATUS.NONE:
|
||||
case GQLCOMMENT_STATUS.PREMOD:
|
||||
case GQLCOMMENT_STATUS.REJECTED:
|
||||
@@ -239,7 +239,7 @@ export function calculateTotalCommentCount(
|
||||
// Because the CommentStatusCounts are not indexable, it should be accessed
|
||||
// by walking the structure.
|
||||
switch (status) {
|
||||
case GQLCOMMENT_STATUS.ACCEPTED:
|
||||
case GQLCOMMENT_STATUS.APPROVED:
|
||||
case GQLCOMMENT_STATUS.NONE:
|
||||
case GQLCOMMENT_STATUS.PREMOD:
|
||||
case GQLCOMMENT_STATUS.REJECTED:
|
||||
|
||||
Reference in New Issue
Block a user