Optimize SQL requests of watch page API endpoints
This commit is contained in:
parent
e972e046db
commit
627621c1e8
15 changed files with 68 additions and 60 deletions
|
@ -25,7 +25,7 @@ run()
|
|||
async function run () {
|
||||
await initDatabaseModels(true)
|
||||
|
||||
const video = await VideoModel.loadByUUID(program['video'])
|
||||
const video = await VideoModel.loadByUUIDWithFile(program['video'])
|
||||
if (!video) throw new Error('Video not found.')
|
||||
if (video.isOwned() === false) throw new Error('Cannot import files of a non owned video.')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue