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-live.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-live.ts')
-rw-r--r-- | server/models/video/video-live.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts index cb4a9b896..014491d50 100644 --- a/server/models/video/video-live.ts +++ b/server/models/video/video-live.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' | 1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' |
2 | import { WEBSERVER } from '@server/initializers/constants' | 2 | import { WEBSERVER } from '@server/initializers/constants' |
3 | import { MVideoLive, MVideoLiveVideo } from '@server/types/models' | 3 | import { MVideoLive, MVideoLiveVideo } from '@server/types/models' |
4 | import { AttributesOnly } from '@shared/core-utils' | ||
4 | import { LiveVideo, VideoState } from '@shared/models' | 5 | import { LiveVideo, VideoState } from '@shared/models' |
5 | import { VideoModel } from './video' | 6 | import { VideoModel } from './video' |
6 | import { VideoBlacklistModel } from './video-blacklist' | 7 | import { VideoBlacklistModel } from './video-blacklist' |
@@ -28,7 +29,7 @@ import { VideoBlacklistModel } from './video-blacklist' | |||
28 | } | 29 | } |
29 | ] | 30 | ] |
30 | }) | 31 | }) |
31 | export class VideoLiveModel extends Model { | 32 | export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>>> { |
32 | 33 | ||
33 | @AllowNull(true) | 34 | @AllowNull(true) |
34 | @Column(DataType.STRING) | 35 | @Column(DataType.STRING) |