chore: rename accept comment to approve comment (#2341)

This commit is contained in:
Kiwi
2019-06-06 18:58:11 +00:00
committed by Wyatt Johnson
parent 39d7540987
commit 8cfced464b
48 changed files with 253 additions and 253 deletions
+1 -1
View File
@@ -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,
];
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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,
+3 -3
View File
@@ -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: