X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fshared%2Fvideo-channels.ts;h=bed9f5dbe7d2109d3a5209ff5dba3599ecbe99f2;hb=8ca52bcc2c37d457e8b19a237c66b8dd1c00b6b9;hp=3fc3d012a6e490e692d1dcea42205d2d7f84ba5c;hpb=9e8789497377cac5554a622da605f5b89587aa9c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/shared/video-channels.ts b/server/middlewares/validators/shared/video-channels.ts index 3fc3d012a..bed9f5dbe 100644 --- a/server/middlewares/validators/shared/video-channels.ts +++ b/server/middlewares/validators/shared/video-channels.ts @@ -1,14 +1,8 @@ -import * as express from 'express' +import express from 'express' import { VideoChannelModel } from '@server/models/video/video-channel' import { MChannelBannerAccountDefault } from '@server/types/models' import { HttpStatusCode } from '@shared/models' -async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { - const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) - - return processVideoChannelExist(videoChannel, res) -} - async function doesVideoChannelIdExist (id: number, res: express.Response) { const videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) @@ -24,7 +18,6 @@ async function doesVideoChannelNameWithHostExist (nameWithDomain: string, res: e // --------------------------------------------------------------------------- export { - doesLocalVideoChannelNameExist, doesVideoChannelIdExist, doesVideoChannelNameWithHostExist }