diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-12 14:09:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-12 14:12:14 +0200 |
commit | 16c016e8b1d5ca46343d3363f9a49e24c5d7c944 (patch) | |
tree | 157dfa22ac95bd76a411aaf78e4df17152530e1c /server/models/video/video-import.ts | |
parent | 9a320a06b663a2e02c3156a07135f75f9e987b11 (diff) | |
download | PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.gz PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.zst PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.zip |
Stricter models typing
Diffstat (limited to 'server/models/video/video-import.ts')
-rw-r--r-- | server/models/video/video-import.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts index d8f09e1e5..5c73fb07c 100644 --- a/server/models/video/video-import.ts +++ b/server/models/video/video-import.ts | |||
@@ -15,6 +15,7 @@ import { | |||
15 | } from 'sequelize-typescript' | 15 | } from 'sequelize-typescript' |
16 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' | 16 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' |
17 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' | 17 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' |
18 | import { AttributesOnly } from '@shared/core-utils' | ||
18 | import { VideoImport, VideoImportState } from '../../../shared' | 19 | import { VideoImport, VideoImportState } from '../../../shared' |
19 | import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' | 20 | import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' |
20 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' | 21 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' |
@@ -52,7 +53,7 @@ import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' | |||
52 | } | 53 | } |
53 | ] | 54 | ] |
54 | }) | 55 | }) |
55 | export class VideoImportModel extends Model { | 56 | export class VideoImportModel extends Model<Partial<AttributesOnly<VideoImportModel>>> { |
56 | @CreatedAt | 57 | @CreatedAt |
57 | createdAt: Date | 58 | createdAt: Date |
58 | 59 | ||