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/abuse/abuse.ts | |
parent | 9a320a06b663a2e02c3156a07135f75f9e987b11 (diff) | |
download | PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.gz PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.zst PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.zip |
Stricter models typing
Diffstat (limited to 'server/models/abuse/abuse.ts')
-rw-r--r-- | server/models/abuse/abuse.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts index 262f364f1..ffe109c2f 100644 --- a/server/models/abuse/abuse.ts +++ b/server/models/abuse/abuse.ts | |||
@@ -16,6 +16,7 @@ import { | |||
16 | UpdatedAt | 16 | UpdatedAt |
17 | } from 'sequelize-typescript' | 17 | } from 'sequelize-typescript' |
18 | import { isAbuseModerationCommentValid, isAbuseReasonValid, isAbuseStateValid } from '@server/helpers/custom-validators/abuses' | 18 | import { isAbuseModerationCommentValid, isAbuseReasonValid, isAbuseStateValid } from '@server/helpers/custom-validators/abuses' |
19 | import { AttributesOnly } from '@shared/core-utils' | ||
19 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 20 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
20 | import { | 21 | import { |
21 | AbuseFilter, | 22 | AbuseFilter, |
@@ -187,7 +188,7 @@ export enum ScopeNames { | |||
187 | } | 188 | } |
188 | ] | 189 | ] |
189 | }) | 190 | }) |
190 | export class AbuseModel extends Model { | 191 | export class AbuseModel extends Model<Partial<AttributesOnly<AbuseModel>>> { |
191 | 192 | ||
192 | @AllowNull(false) | 193 | @AllowNull(false) |
193 | @Default(null) | 194 | @Default(null) |