aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/abuse/abuse-message.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-08 14:30:29 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-09 11:41:22 +0100
commitb49f22d8f9a52ab75fd38db2d377249eb58fa678 (patch)
treea2825877d7b3b53454804a79c9d2a14c5d37385c /server/models/abuse/abuse-message.ts
parent6c8c15f914cd375da1db5d0cd4d924a86c53d4c1 (diff)
downloadPeerTube-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.ts6
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 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses' 2import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses'
3import { MAbuseMessage, MAbuseMessageFormattable } from '@server/types/models'
3import { AbuseMessage } from '@shared/models' 4import { AbuseMessage } from '@shared/models'
4import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' 5import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account'
5import { throwIfNotValid, getSort } from '../utils' 6import { getSort, throwIfNotValid } from '../utils'
6import { AbuseModel } from './abuse' 7import { AbuseModel } from './abuse'
7import { 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})
20export class AbuseMessageModel extends Model<AbuseMessageModel> { 20export 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'))