-async function isVideoChannelNameWithHostExist (nameWithDomain: string, res: express.Response) {
- const [ name, host ] = nameWithDomain.split('@')
- let videoChannel: VideoChannelModel
-
- if (!host || host === CONFIG.WEBSERVER.HOST) videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name)
- else videoChannel = await VideoChannelModel.loadByNameAndHostAndPopulateAccount(name, host)
+async function doesVideoChannelNameWithHostExist (nameWithDomain: string, res: express.Response) {
+ const videoChannel = await VideoChannelModel.loadByNameWithHostAndPopulateAccount(nameWithDomain)