From 868fce62f86812759ccedccf7634236ac3701d9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 3 Jun 2021 18:10:56 +0200 Subject: fetch -> load avoid confusion with AP fetch functions --- server/middlewares/validators/shared/videos.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/middlewares/validators/shared') diff --git a/server/middlewares/validators/shared/videos.ts b/server/middlewares/validators/shared/videos.ts index a6dad4374..3134f623d 100644 --- a/server/middlewares/validators/shared/videos.ts +++ b/server/middlewares/validators/shared/videos.ts @@ -1,5 +1,5 @@ import { Response } from 'express' -import { fetchVideo, VideoFetchType } from '@server/lib/model-loaders' +import { loadVideo, VideoLoadType } from '@server/lib/model-loaders' import { VideoChannelModel } from '@server/models/video/video-channel' import { VideoFileModel } from '@server/models/video/video-file' import { @@ -15,10 +15,10 @@ import { import { HttpStatusCode } from '@shared/core-utils' import { UserRight } from '@shared/models' -async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { +async function doesVideoExist (id: number | string, res: Response, fetchType: VideoLoadType = 'all') { const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined - const video = await fetchVideo(id, fetchType, userId) + const video = await loadVideo(id, fetchType, userId) if (video === null) { res.fail({ -- cgit v1.2.3