diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-08 14:30:29 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-09 11:41:22 +0100 |
commit | b49f22d8f9a52ab75fd38db2d377249eb58fa678 (patch) | |
tree | a2825877d7b3b53454804a79c9d2a14c5d37385c /server/controllers/api/videos | |
parent | 6c8c15f914cd375da1db5d0cd4d924a86c53d4c1 (diff) | |
download | PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.gz PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.zst PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.zip |
Upgrade sequelize to v6
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/import.ts | 5 |
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 @@ | |||
1 | import * as Bluebird from 'bluebird' | ||
2 | import * as express from 'express' | 1 | import * as express from 'express' |
3 | import { move, readFile } from 'fs-extra' | 2 | import { move, readFile } from 'fs-extra' |
4 | import * as magnetUtil from 'magnet-uri' | 3 | import * as magnetUtil from 'magnet-uri' |
@@ -17,6 +16,7 @@ import { | |||
17 | } from '@server/types/models' | 16 | } from '@server/types/models' |
18 | import { MVideoImport, MVideoImportFormattable } from '@server/types/models/video/video-import' | 17 | import { MVideoImport, MVideoImportFormattable } from '@server/types/models/video/video-import' |
19 | import { VideoImportCreate, VideoImportState, VideoPrivacy, VideoState } from '../../../../shared' | 18 | import { VideoImportCreate, VideoImportState, VideoPrivacy, VideoState } from '../../../../shared' |
19 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
20 | import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type' | 20 | import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type' |
21 | import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger' | 21 | import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger' |
22 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' | 22 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' |
@@ -36,7 +36,6 @@ import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoIm | |||
36 | import { VideoModel } from '../../../models/video/video' | 36 | import { VideoModel } from '../../../models/video/video' |
37 | import { VideoCaptionModel } from '../../../models/video/video-caption' | 37 | import { VideoCaptionModel } from '../../../models/video/video-caption' |
38 | import { VideoImportModel } from '../../../models/video/video-import' | 38 | import { VideoImportModel } from '../../../models/video/video-import' |
39 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
40 | 39 | ||
41 | const auditLogger = auditLoggerFactory('video-imports') | 40 | const auditLogger = auditLoggerFactory('video-imports') |
42 | const videoImportsRouter = express.Router() | 41 | const 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 => { |