From 5b77537ce54832f47931ba47dc513be2a9197f92 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Jul 2019 12:04:15 +0200 Subject: Correctly notify on auto blacklist --- server/helpers/custom-validators/video-channels.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'server/helpers/custom-validators') diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts index 0471f6ec4..f55f0c8ef 100644 --- a/server/helpers/custom-validators/video-channels.ts +++ b/server/helpers/custom-validators/video-channels.ts @@ -1,9 +1,7 @@ -import * as express from 'express' import 'express-validator' import 'multer' import * as validator from 'validator' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' -import { VideoChannelModel } from '../../models/video/video-channel' import { exists } from './misc' const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS @@ -25,18 +23,5 @@ function isVideoChannelSupportValid (value: string) { export { isVideoChannelDescriptionValid, isVideoChannelNameValid, - isVideoChannelSupportValid, -} - -function processVideoChannelExist (videoChannel: VideoChannelModel, res: express.Response) { - if (!videoChannel) { - res.status(404) - .json({ error: 'Video channel not found' }) - .end() - - return false - } - - res.locals.videoChannel = videoChannel - return true + isVideoChannelSupportValid } -- cgit v1.2.3