1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Rename video full loading

This commit is contained in:
Chocobozzz 2022-06-28 14:57:51 +02:00
parent 4c8336af67
commit 4fae2b1f30
No known key found for this signature in database
GPG key ID: 583A612D890159BE
31 changed files with 48 additions and 48 deletions

View file

@ -83,7 +83,7 @@ function buildVideosHelpers () {
removeVideo: (id: number) => {
return sequelizeTypescript.transaction(async t => {
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id, t)
const video = await VideoModel.loadFull(id, t)
await video.destroy({ transaction: t })
})
@ -94,7 +94,7 @@ function buildVideosHelpers () {
},
getFiles: async (id: number | string) => {
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id)
const video = await VideoModel.loadFull(id)
if (!video) return undefined
const webtorrentVideoFiles = (video.VideoFiles || []).map(f => ({
@ -178,14 +178,14 @@ function buildModerationHelpers () {
},
blacklistVideo: async (options: { videoIdOrUUID: number | string, createOptions: VideoBlacklistCreate }) => {
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(options.videoIdOrUUID)
const video = await VideoModel.loadFull(options.videoIdOrUUID)
if (!video) return
await blacklistVideo(video, options.createOptions)
},
unblacklistVideo: async (options: { videoIdOrUUID: number | string }) => {
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(options.videoIdOrUUID)
const video = await VideoModel.loadFull(options.videoIdOrUUID)
if (!video) return
const videoBlacklist = await VideoBlacklistModel.loadByVideoId(video.id)