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/models/abuse/abuse-message.ts | |
parent | 6c8c15f914cd375da1db5d0cd4d924a86c53d4c1 (diff) | |
download | PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.gz PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.zst PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.zip |
Upgrade sequelize to v6
Diffstat (limited to 'server/models/abuse/abuse-message.ts')
-rw-r--r-- | server/models/abuse/abuse-message.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/abuse/abuse-message.ts b/server/models/abuse/abuse-message.ts index fce20f7a7..7e51b3e07 100644 --- a/server/models/abuse/abuse-message.ts +++ b/server/models/abuse/abuse-message.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' | 1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' |
2 | import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses' | 2 | import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses' |
3 | import { MAbuseMessage, MAbuseMessageFormattable } from '@server/types/models' | ||
3 | import { AbuseMessage } from '@shared/models' | 4 | import { AbuseMessage } from '@shared/models' |
4 | import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' | 5 | import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' |
5 | import { throwIfNotValid, getSort } from '../utils' | 6 | import { getSort, throwIfNotValid } from '../utils' |
6 | import { AbuseModel } from './abuse' | 7 | import { AbuseModel } from './abuse' |
7 | import { MAbuseMessageFormattable, MAbuseMessage } from '@server/types/models' | ||
8 | 8 | ||
9 | @Table({ | 9 | @Table({ |
10 | tableName: 'abuseMessage', | 10 | tableName: 'abuseMessage', |
@@ -17,7 +17,7 @@ import { MAbuseMessageFormattable, MAbuseMessage } from '@server/types/models' | |||
17 | } | 17 | } |
18 | ] | 18 | ] |
19 | }) | 19 | }) |
20 | export class AbuseMessageModel extends Model<AbuseMessageModel> { | 20 | export class AbuseMessageModel extends Model { |
21 | 21 | ||
22 | @AllowNull(false) | 22 | @AllowNull(false) |
23 | @Is('AbuseMessage', value => throwIfNotValid(value, isAbuseMessageValid, 'message')) | 23 | @Is('AbuseMessage', value => throwIfNotValid(value, isAbuseMessageValid, 'message')) |