diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-18 12:00:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-19 09:54:37 +0200 |
commit | 627621c1e8d37c33f7b3dd59f4c8907b12c630bc (patch) | |
tree | 007e7118f482c543d3898b222b62c185fda4fd2b /scripts/create-import-video-file-job.ts | |
parent | e972e046dbe9b499944c4fab9220eee13e31ac1b (diff) | |
download | PeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.tar.gz PeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.tar.zst PeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.zip |
Optimize SQL requests of watch page API endpoints
Diffstat (limited to 'scripts/create-import-video-file-job.ts')
-rw-r--r-- | scripts/create-import-video-file-job.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/create-import-video-file-job.ts b/scripts/create-import-video-file-job.ts index 2b636014a..c8c6c6429 100644 --- a/scripts/create-import-video-file-job.ts +++ b/scripts/create-import-video-file-job.ts | |||
@@ -25,7 +25,7 @@ run() | |||
25 | async function run () { | 25 | async function run () { |
26 | await initDatabaseModels(true) | 26 | await initDatabaseModels(true) |
27 | 27 | ||
28 | const video = await VideoModel.loadByUUID(program['video']) | 28 | const video = await VideoModel.loadByUUIDWithFile(program['video']) |
29 | if (!video) throw new Error('Video not found.') | 29 | if (!video) throw new Error('Video not found.') |
30 | if (video.isOwned() === false) throw new Error('Cannot import files of a non owned video.') | 30 | if (video.isOwned() === false) throw new Error('Cannot import files of a non owned video.') |
31 | 31 | ||