aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-08 14:30:29 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-09 11:41:22 +0100
commitb49f22d8f9a52ab75fd38db2d377249eb58fa678 (patch)
treea2825877d7b3b53454804a79c9d2a14c5d37385c /server/controllers/api
parent6c8c15f914cd375da1db5d0cd4d924a86c53d4c1 (diff)
downloadPeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.gz
PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.zst
PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.zip
Upgrade sequelize to v6
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos/import.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index cd9ba046d..82e084c54 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -1,4 +1,3 @@
1import * as Bluebird from 'bluebird'
2import * as express from 'express' 1import * as express from 'express'
3import { move, readFile } from 'fs-extra' 2import { move, readFile } from 'fs-extra'
4import * as magnetUtil from 'magnet-uri' 3import * as magnetUtil from 'magnet-uri'
@@ -17,6 +16,7 @@ import {
17} from '@server/types/models' 16} from '@server/types/models'
18import { MVideoImport, MVideoImportFormattable } from '@server/types/models/video/video-import' 17import { MVideoImport, MVideoImportFormattable } from '@server/types/models/video/video-import'
19import { VideoImportCreate, VideoImportState, VideoPrivacy, VideoState } from '../../../../shared' 18import { VideoImportCreate, VideoImportState, VideoPrivacy, VideoState } from '../../../../shared'
19import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
20import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type' 20import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type'
21import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger' 21import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger'
22import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' 22import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils'
@@ -36,7 +36,6 @@ import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoIm
36import { VideoModel } from '../../../models/video/video' 36import { VideoModel } from '../../../models/video/video'
37import { VideoCaptionModel } from '../../../models/video/video-caption' 37import { VideoCaptionModel } from '../../../models/video/video-caption'
38import { VideoImportModel } from '../../../models/video/video-import' 38import { VideoImportModel } from '../../../models/video/video-import'
39import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
40 39
41const auditLogger = auditLoggerFactory('video-imports') 40const auditLogger = auditLoggerFactory('video-imports')
42const videoImportsRouter = express.Router() 41const videoImportsRouter = express.Router()
@@ -314,7 +313,7 @@ function insertIntoDB (parameters: {
314 tags: string[] 313 tags: string[]
315 videoImportAttributes: Partial<MVideoImport> 314 videoImportAttributes: Partial<MVideoImport>
316 user: MUser 315 user: MUser
317}): Bluebird<MVideoImportFormattable> { 316}): Promise<MVideoImportFormattable> {
318 const { video, thumbnailModel, previewModel, videoChannel, tags, videoImportAttributes, user } = parameters 317 const { video, thumbnailModel, previewModel, videoChannel, tags, videoImportAttributes, user } = parameters
319 318
320 return sequelizeTypescript.transaction(async t => { 319 return sequelizeTypescript.transaction(async t => {