X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Factor%2Factor-follow.ts;h=9615229dd7ea3a332262e3f2a31951e42d29ab7f;hb=77239b425a8e00822a53c9907415832a473c3eb6;hp=566bb5f319b0b45a17d081d34aa7251360d73312;hpb=927fa4b11f692174d6296aa096d7a74bacdeea8b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/actor/actor-follow.ts b/server/models/actor/actor-follow.ts index 566bb5f31..9615229dd 100644 --- a/server/models/actor/actor-follow.ts +++ b/server/models/actor/actor-follow.ts @@ -1,4 +1,4 @@ -import { difference, values } from 'lodash' +import { difference } from 'lodash' import { Attributes, FindOptions, Includeable, IncludeOptions, Op, QueryTypes, Transaction, WhereAttributeHash } from 'sequelize' import { AfterCreate, @@ -69,7 +69,7 @@ import { InstanceListFollowingQueryBuilder, ListFollowingOptions } from './sql/i export class ActorFollowModel extends Model>> { @AllowNull(false) - @Column(DataType.ENUM(...values(FOLLOW_STATES))) + @Column(DataType.ENUM(...Object.values(FOLLOW_STATES))) state: FollowState @AllowNull(false) @@ -276,7 +276,7 @@ export class ActorFollowModel extends Model> = { actorId} + const where: WhereAttributeHash> = { actorId } if (state) where.state = state const query: FindOptions> = {