aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account-video-rate.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-12 14:09:04 +0200
committerChocobozzz <me@florianbigard.com>2021-05-12 14:12:14 +0200
commit16c016e8b1d5ca46343d3363f9a49e24c5d7c944 (patch)
tree157dfa22ac95bd76a411aaf78e4df17152530e1c /server/models/account/account-video-rate.ts
parent9a320a06b663a2e02c3156a07135f75f9e987b11 (diff)
downloadPeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.gz
PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.zst
PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.zip
Stricter models typing
Diffstat (limited to 'server/models/account/account-video-rate.ts')
-rw-r--r--server/models/account/account-video-rate.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts
index 576a44576..ee6dbc6da 100644
--- a/server/models/account/account-video-rate.ts
+++ b/server/models/account/account-video-rate.ts
@@ -7,6 +7,7 @@ import {
7 MAccountVideoRateAccountVideo, 7 MAccountVideoRateAccountVideo,
8 MAccountVideoRateFormattable 8 MAccountVideoRateFormattable
9} from '@server/types/models/video/video-rate' 9} from '@server/types/models/video/video-rate'
10import { AttributesOnly } from '@shared/core-utils'
10import { AccountVideoRate } from '../../../shared' 11import { AccountVideoRate } from '../../../shared'
11import { VideoRateType } from '../../../shared/models/videos' 12import { VideoRateType } from '../../../shared/models/videos'
12import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 13import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
@@ -42,7 +43,7 @@ import { AccountModel } from './account'
42 } 43 }
43 ] 44 ]
44}) 45})
45export class AccountVideoRateModel extends Model { 46export class AccountVideoRateModel extends Model<Partial<AttributesOnly<AccountVideoRateModel>>> {
46 47
47 @AllowNull(false) 48 @AllowNull(false)
48 @Column(DataType.ENUM(...values(VIDEO_RATE_TYPES))) 49 @Column(DataType.ENUM(...values(VIDEO_RATE_TYPES)))