-function checkVideoChannelExists (id: string, res: express.Response, callback: () => void) {
- let promise: Promise<VideoChannelInstance>
+async function isLocalVideoChannelNameExist (name: string, res: express.Response) {
+ const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name)
+
+ return processVideoChannelExist(videoChannel, res)
+}
+
+async function isVideoChannelIdExist (id: string, res: express.Response) {
+ let videoChannel: VideoChannelModel