X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Foembed.ts;h=c89bc26de8ae24ce2275971bdefee5bbd33f33ac;hb=5b9c965d5aa747f29b081289f930ee215fdc23c8;hp=fb7b726e5c7913857a6242e2d41d4b52169c70d8;hpb=3fd3ab2d34d512b160a5e6084d7609be7b4f4452;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/oembed.ts b/server/middlewares/validators/oembed.ts index fb7b726e5..c89bc26de 100644 --- a/server/middlewares/validators/oembed.ts +++ b/server/middlewares/validators/oembed.ts @@ -1,9 +1,10 @@ import * as express from 'express' import { query } from 'express-validator/check' import { join } from 'path' -import { isTestInstance, logger } from '../../helpers' +import { isTestInstance } from '../../helpers/core-utils' import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' -import { isVideoExist } from '../../helpers/custom-validators/videos' +import { doesVideoExist } from '../../helpers/custom-validators/videos' +import { logger } from '../../helpers/logger' import { CONFIG } from '../../initializers' import { areValidationErrors } from './utils' @@ -51,7 +52,7 @@ const oembedValidator = [ .end() } - if (!await isVideoExist(videoId, res)) return + if (!await doesVideoExist(videoId, res)) return return next() }