From 18cfac83a18102273880e8817e0603f020c23d21 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Feb 2018 12:47:56 +0100 Subject: Fix job count api --- server/lib/job-queue/job-queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 521d609cb..d9d7a6e42 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts @@ -83,7 +83,7 @@ class JobQueue { listForApi (state: JobState, start: number, count: number, sort: string) { return new Promise((res, rej) => { - kue.Job.rangeByState(state, start, start + count, sort, (err, jobs) => { + kue.Job.rangeByState(state, start, start + count - 1, sort, (err, jobs) => { if (err) return rej(err) return res(jobs) -- cgit v1.2.3