mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Stronger model typings
This commit is contained in:
parent
13176a07a9
commit
453e83ea5d
176 changed files with 2118 additions and 1133 deletions
|
@ -11,6 +11,7 @@ import { AccountModel } from '../../../models/account/account'
|
|||
import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
|
||||
import { VideoShareModel } from '../../../models/video/video-share'
|
||||
import { VideoCommentModel } from '../../../models/video/video-comment'
|
||||
import { MAccountDefault, MVideoFullLight } from '../../../typings/models'
|
||||
|
||||
type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
|
||||
|
||||
|
@ -26,10 +27,10 @@ async function processActivityPubHttpFetcher (job: Bull.Job) {
|
|||
|
||||
const payload = job.data as ActivitypubHttpFetcherPayload
|
||||
|
||||
let video: VideoModel
|
||||
let video: MVideoFullLight
|
||||
if (payload.videoId) video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoId)
|
||||
|
||||
let account: AccountModel
|
||||
let account: MAccountDefault
|
||||
if (payload.accountId) account = await AccountModel.load(payload.accountId)
|
||||
|
||||
const fetcherType: { [ id in FetchType ]: (items: any[]) => Promise<any> } = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue