mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-25 18:20:31 -06:00
Fix lint
This commit is contained in:
parent
a3fd560d11
commit
38768a367b
@ -1,5 +1,4 @@
|
||||
import * as Sequelize from 'sequelize'
|
||||
import { ACTOR_FOLLOW_SCORE } from '../index'
|
||||
|
||||
async function up (utils: {
|
||||
transaction: Sequelize.Transaction,
|
||||
|
@ -2,9 +2,8 @@ import * as Bluebird from 'bluebird'
|
||||
import { values } from 'lodash'
|
||||
import * as Sequelize from 'sequelize'
|
||||
import {
|
||||
AfterCreate, AfterDestroy, AfterUpdate,
|
||||
AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model, Table,
|
||||
UpdatedAt
|
||||
AfterCreate, AfterDestroy, AfterUpdate, AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, IsInt, Max, Model,
|
||||
Table, UpdatedAt
|
||||
} from 'sequelize-typescript'
|
||||
import { FollowState } from '../../../shared/models/actors'
|
||||
import { AccountFollow } from '../../../shared/models/actors/follow.model'
|
||||
@ -83,7 +82,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
|
||||
@AfterCreate
|
||||
@AfterUpdate
|
||||
static incrementFollowerAndFollowingCount (instance: ActorFollowModel) {
|
||||
if (instance.state !== 'accepted') return
|
||||
if (instance.state !== 'accepted') return undefined
|
||||
|
||||
return Promise.all([
|
||||
ActorModel.incrementFollows(instance.actorId, 'followingCount', 1),
|
||||
|
@ -117,7 +117,7 @@ describe('Test follows', function () {
|
||||
expect(follows.length).to.equal(0)
|
||||
})
|
||||
|
||||
it('Should have the correct following counts', async function () {
|
||||
it('Should have the correct follows counts', async function () {
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9001', 0, 2)
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9002', 1, 0)
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9003', 1, 0)
|
||||
@ -158,7 +158,7 @@ describe('Test follows', function () {
|
||||
expect(follows.length).to.equal(0)
|
||||
})
|
||||
|
||||
it('Should have the correct following counts 2', async function () {
|
||||
it('Should have the correct follows counts 2', async function () {
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9001', 0, 1)
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9002', 1, 0)
|
||||
|
||||
@ -248,7 +248,7 @@ describe('Test follows', function () {
|
||||
await wait(7000)
|
||||
})
|
||||
|
||||
it('Should have the correct following counts 2', async function () {
|
||||
it('Should have the correct follows counts 3', async function () {
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9001', 0, 2)
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9002', 1, 0)
|
||||
await expectAccountFollows(servers[0].url, 'peertube@localhost:9003', 1, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user