Cleanup model types

This commit is contained in:
Chocobozzz
2019-08-20 13:52:49 +02:00
parent 96ca24f00e
commit 0283eaac2a
50 changed files with 696 additions and 349 deletions

View File

@@ -19,7 +19,7 @@ import { getOrCreateActorAndServerAndModel, getOrCreateVideoAndAccountAndChannel
import { logger } from '../../helpers/logger'
import { VideoChannelModel } from '../../models/video/video-channel'
import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger'
import { MChannelAccountDefault, MVideoAccountAllFiles } from '../../typings/models'
import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../../typings/models'
const searchRouter = express.Router()
@@ -138,7 +138,7 @@ async function searchVideosDB (query: VideosSearchQuery, res: express.Response)
}
async function searchVideoURI (url: string, res: express.Response) {
let video: MVideoAccountAllFiles
let video: MVideoAccountLightBlacklistAllFiles
// Check if we can fetch a remote video with the URL
if (isUserAbleToSearchRemoteURI(res)) {

View File

@@ -25,7 +25,7 @@ import { sequelizeTypescript } from '../../../initializers/database'
import { createVideoMiniatureFromExisting } from '../../../lib/thumbnail'
import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type'
import {
MChannelActorAccountDefault,
MChannelAccountDefault,
MThumbnail,
MUser,
MVideoTag,
@@ -234,7 +234,7 @@ function insertIntoDB (parameters: {
video: MVideoThumbnailAccountDefault,
thumbnailModel: MThumbnail,
previewModel: MThumbnail,
videoChannel: MChannelActorAccountDefault,
videoChannel: MChannelAccountDefault,
tags: string[],
videoImportAttributes: Partial<MVideoImport>,
user: MUser