aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/abuse/abuse.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.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.ts')
-rw-r--r--server/models/abuse/abuse.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts
index 290270fe2..de249d211 100644
--- a/server/models/abuse/abuse.ts
+++ b/server/models/abuse/abuse.ts
@@ -1,4 +1,3 @@
1import * as Bluebird from 'bluebird'
2import { invert } from 'lodash' 1import { invert } from 'lodash'
3import { literal, Op, QueryTypes } from 'sequelize' 2import { literal, Op, QueryTypes } from 'sequelize'
4import { 3import {
@@ -188,7 +187,7 @@ export enum ScopeNames {
188 } 187 }
189 ] 188 ]
190}) 189})
191export class AbuseModel extends Model<AbuseModel> { 190export class AbuseModel extends Model {
192 191
193 @AllowNull(false) 192 @AllowNull(false)
194 @Default(null) 193 @Default(null)
@@ -265,7 +264,7 @@ export class AbuseModel extends Model<AbuseModel> {
265 }) 264 })
266 VideoAbuse: VideoAbuseModel 265 VideoAbuse: VideoAbuseModel
267 266
268 static loadByIdWithReporter (id: number): Bluebird<MAbuseReporter> { 267 static loadByIdWithReporter (id: number): Promise<MAbuseReporter> {
269 const query = { 268 const query = {
270 where: { 269 where: {
271 id 270 id
@@ -281,7 +280,7 @@ export class AbuseModel extends Model<AbuseModel> {
281 return AbuseModel.findOne(query) 280 return AbuseModel.findOne(query)
282 } 281 }
283 282
284 static loadFull (id: number): Bluebird<MAbuseFull> { 283 static loadFull (id: number): Promise<MAbuseFull> {
285 const query = { 284 const query = {
286 where: { 285 where: {
287 id 286 id