From 3487330d308166afb542cbacae0475693c0b059e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 9 Jun 2020 16:07:10 +0200 Subject: preserve original variable names server-side --- shared/extra-utils/users/user-notifications.ts | 6 +++--- shared/extra-utils/videos/video-blacklist.ts | 4 ++-- shared/models/users/user-flag.model.ts | 2 +- shared/models/users/user-notification.model.ts | 6 +++--- shared/models/users/user-right.enum.ts | 2 +- shared/models/users/user-role.ts | 2 +- shared/models/videos/blacklist/video-blacklist.model.ts | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'shared') diff --git a/shared/extra-utils/users/user-notifications.ts b/shared/extra-utils/users/user-notifications.ts index 6f85bd450..bd00894c4 100644 --- a/shared/extra-utils/users/user-notifications.ts +++ b/shared/extra-utils/users/user-notifications.ts @@ -455,7 +455,7 @@ async function checkNewVideoAbuseForModerators (base: CheckerBaseParams, videoUU } async function checkVideoAutoBlacklistForModerators (base: CheckerBaseParams, videoUUID: string, videoName: string, type: CheckerType) { - const notificationType = UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS + const notificationType = UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS function notificationChecker (notification: UserNotification, type: CheckerType) { if (type === 'presence') { @@ -486,8 +486,8 @@ async function checkNewBlacklistOnMyVideo ( blacklistType: 'blacklist' | 'unblacklist' ) { const notificationType = blacklistType === 'blacklist' - ? UserNotificationType.BLOCK_ON_MY_VIDEO - : UserNotificationType.UNBLOCK_ON_MY_VIDEO + ? UserNotificationType.BLACKLIST_ON_MY_VIDEO + : UserNotificationType.UNBLACKLIST_ON_MY_VIDEO function notificationChecker (notification: UserNotification) { expect(notification).to.not.be.undefined diff --git a/shared/extra-utils/videos/video-blacklist.ts b/shared/extra-utils/videos/video-blacklist.ts index c06b2aa5d..ba139ef95 100644 --- a/shared/extra-utils/videos/video-blacklist.ts +++ b/shared/extra-utils/videos/video-blacklist.ts @@ -1,5 +1,5 @@ import * as request from 'supertest' -import { VideoBlockType } from '../../models/videos' +import { VideoBlacklistType } from '../../models/videos' import { makeGetRequest } from '..' function addVideoToBlacklist ( @@ -45,7 +45,7 @@ function getBlacklistedVideosList (parameters: { url: string token: string sort?: string - type?: VideoBlockType + type?: VideoBlacklistType specialStatus?: number }) { const { url, token, sort, type, specialStatus = 200 } = parameters diff --git a/shared/models/users/user-flag.model.ts b/shared/models/users/user-flag.model.ts index e8b5a5c50..b94262d5e 100644 --- a/shared/models/users/user-flag.model.ts +++ b/shared/models/users/user-flag.model.ts @@ -1,4 +1,4 @@ export enum UserAdminFlag { NONE = 0, - BYPASS_VIDEO_AUTO_BLOCK = 1 << 0 + BYPASS_VIDEO_AUTO_BLACKLIST = 1 << 0 } diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts index 2329503a8..e9be1ca7f 100644 --- a/shared/models/users/user-notification.model.ts +++ b/shared/models/users/user-notification.model.ts @@ -5,8 +5,8 @@ export enum UserNotificationType { NEW_COMMENT_ON_MY_VIDEO = 2, NEW_VIDEO_ABUSE_FOR_MODERATORS = 3, - BLOCK_ON_MY_VIDEO = 4, - UNBLOCK_ON_MY_VIDEO = 5, + BLACKLIST_ON_MY_VIDEO = 4, + UNBLACKLIST_ON_MY_VIDEO = 5, MY_VIDEO_PUBLISHED = 6, @@ -17,7 +17,7 @@ export enum UserNotificationType { NEW_FOLLOW = 10, COMMENT_MENTION = 11, - VIDEO_AUTO_BLOCK_FOR_MODERATORS = 12, + VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12, NEW_INSTANCE_FOLLOWER = 13, diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 3fb760709..2f88a65de 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts @@ -20,7 +20,7 @@ export enum UserRight { MANAGE_ACCOUNTS_BLOCKLIST, MANAGE_SERVERS_BLOCKLIST, - MANAGE_VIDEO_BLOCKS, + MANAGE_VIDEO_BLACKLIST, REMOVE_ANY_VIDEO, REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 30ec5edce..2b08b5850 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -19,7 +19,7 @@ const userRoleRights: { [ id in UserRole ]: UserRight[] } = { ], [UserRole.MODERATOR]: [ - UserRight.MANAGE_VIDEO_BLOCKS, + UserRight.MANAGE_VIDEO_BLACKLIST, UserRight.MANAGE_VIDEO_ABUSES, UserRight.REMOVE_ANY_VIDEO, UserRight.REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts index e6090b1e9..a6e0ef175 100644 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ b/shared/models/videos/blacklist/video-blacklist.model.ts @@ -1,15 +1,15 @@ import { Video } from '../video.model' -export enum VideoBlockType { +export enum VideoBlacklistType { MANUAL = 1, AUTO_BEFORE_PUBLISHED = 2 } -export interface VideoBlocklist { +export interface VideoBlacklist { id: number unfederated: boolean reason?: string - type: VideoBlockType + type: VideoBlacklistType video: Video -- cgit v1.2.3