X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fserver%2Fserver.ts;h=ef42de09063b0f5ed7bf9d511e7d7d01c4fe65cf;hb=70c6a848a43868d826453da11d212fa96956fb0c;hp=0d3c092e040d9536838017f1ddbbaa3585276ab5;hpb=eae0365b5c5468e51e9795b0e894815ebda86b4a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/server/server.ts b/server/models/server/server.ts index 0d3c092e0..ef42de090 100644 --- a/server/models/server/server.ts +++ b/server/models/server/server.ts @@ -1,7 +1,7 @@ import { Transaction } from 'sequelize' import { AllowNull, Column, CreatedAt, Default, HasMany, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' import { MServer, MServerFormattable } from '@server/types/models/server' -import { AttributesOnly } from '@shared/core-utils' +import { AttributesOnly } from '@shared/typescript-utils' import { isHostValid } from '../../helpers/custom-validators/servers' import { ActorModel } from '../actor/actor' import { throwIfNotValid } from '../utils' @@ -50,7 +50,7 @@ export class ServerModel extends Model>> { }, onDelete: 'CASCADE' }) - BlockedByAccounts: ServerBlocklistModel[] + BlockedBy: ServerBlocklistModel[] static load (id: number, transaction?: Transaction): Promise { const query = { @@ -81,7 +81,7 @@ export class ServerModel extends Model>> { } isBlocked () { - return this.BlockedByAccounts && this.BlockedByAccounts.length !== 0 + return this.BlockedBy && this.BlockedBy.length !== 0 } toFormattedJSON (this: MServerFormattable) {