X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fshared%2Fvideo-channels.ts;h=bed9f5dbe7d2109d3a5209ff5dba3599ecbe99f2;hb=8ca52bcc2c37d457e8b19a237c66b8dd1c00b6b9;hp=fe2e663b754b4f30d52270645eeb0bd7c2c4d99d;hpb=cf21b2cbef61929177b9c09b5e017c3b7eb8535d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/shared/video-channels.ts b/server/middlewares/validators/shared/video-channels.ts index fe2e663b7..bed9f5dbe 100644 --- a/server/middlewares/validators/shared/video-channels.ts +++ b/server/middlewares/validators/shared/video-channels.ts @@ -1,13 +1,7 @@ -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/core-utils' - -async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { - const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) - - return processVideoChannelExist(videoChannel, res) -} +import { HttpStatusCode } from '@shared/models' 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 }