mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Allow plugins to load a video by id
This commit is contained in:
parent
d93e43164a
commit
6559da2821
4 changed files with 22 additions and 6 deletions
|
@ -63,6 +63,10 @@ function buildVideosHelpers () {
|
|||
return VideoModel.loadByUrl(url)
|
||||
},
|
||||
|
||||
loadByIdOrUUID: (id: number | string) => {
|
||||
return VideoModel.load(id)
|
||||
},
|
||||
|
||||
removeVideo: (id: number) => {
|
||||
return sequelizeTypescript.transaction(async t => {
|
||||
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id, t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue