aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/custom-validators/video-ownership.ts2
-rw-r--r--server/tests/api/server/jobs.ts4
2 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/video-ownership.ts b/server/helpers/custom-validators/video-ownership.ts
index aaa0c736b..a7771e07b 100644
--- a/server/helpers/custom-validators/video-ownership.ts
+++ b/server/helpers/custom-validators/video-ownership.ts
@@ -31,7 +31,7 @@ export function checkUserCanTerminateOwnershipChange (
31 videoChangeOwnership: VideoChangeOwnershipModel, 31 videoChangeOwnership: VideoChangeOwnershipModel,
32 res: Response 32 res: Response
33): boolean { 33): boolean {
34 if (videoChangeOwnership.NextOwner.userId === user.Account.userId) { 34 if (videoChangeOwnership.NextOwner.userId === user.id) {
35 return true 35 return true
36 } 36 }
37 37
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index b2922c5da..f5a19c5ea 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -45,7 +45,9 @@ describe('Test jobs', function () {
45 expect(res.body.total).to.be.above(2) 45 expect(res.body.total).to.be.above(2)
46 expect(res.body.data).to.have.lengthOf(1) 46 expect(res.body.data).to.have.lengthOf(1)
47 47
48 const job = res.body.data[0] 48 let job = res.body.data[0]
49 // Skip repeat jobs
50 if (job.type === 'videos-views') job = res.body.data[1]
49 51
50 expect(job.state).to.equal('completed') 52 expect(job.state).to.equal('completed')
51 expect(job.type).to.equal('activitypub-follow') 53 expect(job.type).to.equal('activitypub-follow')