X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fmodel-loaders%2Fvideo.ts;h=91057d40591a2dd2c7518e9488ec5c4db4e84441;hb=d9dd51aec75d59bd322e249ae1c3ae98277957d3;hp=cef6a367c1c05e960cdeac0db4bd9a7a72facadd;hpb=4fae2b1f300c1f027629569817262f60873a663a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/model-loaders/video.ts b/server/lib/model-loaders/video.ts index cef6a367c..91057d405 100644 --- a/server/lib/model-loaders/video.ts +++ b/server/lib/model-loaders/video.ts @@ -7,7 +7,6 @@ import { MVideoImmutable, MVideoThumbnail } from '@server/types/models' -import { Hooks } from '../plugins/hooks' type VideoLoadType = 'for-api' | 'all' | 'only-video' | 'id' | 'none' | 'only-immutable-attributes' @@ -27,13 +26,7 @@ function loadVideo ( userId?: number ): Promise { - if (fetchType === 'for-api') { - return Hooks.wrapPromiseFun( - VideoModel.loadForGetAPI, - { id, userId }, - 'filter:api.video.get.result' - ) - } + if (fetchType === 'for-api') return VideoModel.loadForGetAPI({ id, userId }) if (fetchType === 'all') return VideoModel.loadFull(id, undefined, userId)