diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-12 12:18:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-12 12:18:11 +0100 |
commit | 38768a367bf41393128cc9476700b99022d7d92a (patch) | |
tree | 8ece292bd47296d6f310411985ccc251522ab68c /server/models/activitypub | |
parent | a3fd560d11554073f0247f3785192cab920ae602 (diff) | |
download | PeerTube-38768a367bf41393128cc9476700b99022d7d92a.tar.gz PeerTube-38768a367bf41393128cc9476700b99022d7d92a.tar.zst PeerTube-38768a367bf41393128cc9476700b99022d7d92a.zip |
Fix lint
Diffstat (limited to 'server/models/activitypub')
-rw-r--r-- | server/models/activitypub/actor-follow.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 435d22db5..ced481547 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -2,9 +2,8 @@ import * as Bluebird from 'bluebird' | |||
2 | import { values } from 'lodash' | 2 | import { values } from 'lodash' |
3 | import * as Sequelize from 'sequelize' | 3 | import * as Sequelize from 'sequelize' |
4 | import { | 4 | import { |
5 | AfterCreate, AfterDestroy, AfterUpdate, | 5 | AfterCreate, AfterDestroy, AfterUpdate, AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model, |
6 | AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model, Table, | 6 | Table, UpdatedAt |
7 | UpdatedAt | ||
8 | } from 'sequelize-typescript' | 7 | } from 'sequelize-typescript' |
9 | import { FollowState } from '../../../shared/models/actors' | 8 | import { FollowState } from '../../../shared/models/actors' |
10 | import { AccountFollow } from '../../../shared/models/actors/follow.model' | 9 | import { AccountFollow } from '../../../shared/models/actors/follow.model' |
@@ -83,7 +82,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
83 | @AfterCreate | 82 | @AfterCreate |
84 | @AfterUpdate | 83 | @AfterUpdate |
85 | static incrementFollowerAndFollowingCount (instance: ActorFollowModel) { | 84 | static incrementFollowerAndFollowingCount (instance: ActorFollowModel) { |
86 | if (instance.state !== 'accepted') return | 85 | if (instance.state !== 'accepted') return undefined |
87 | 86 | ||
88 | return Promise.all([ | 87 | return Promise.all([ |
89 | ActorModel.incrementFollows(instance.actorId, 'followingCount', 1), | 88 | ActorModel.incrementFollows(instance.actorId, 'followingCount', 1), |