diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-09 11:35:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-09 11:39:31 +0200 |
commit | e2b2c726b1c1c31794d324c3afd7c24e1f953131 (patch) | |
tree | 344aa10d8659e5e701c7127d7390ff45244afb86 /server/controllers/api | |
parent | cfb5edbd9e666b93d9680a34df59096d23d51bd5 (diff) | |
download | PeerTube-e2b2c726b1c1c31794d324c3afd7c24e1f953131.tar.gz PeerTube-e2b2c726b1c1c31794d324c3afd7c24e1f953131.tar.zst PeerTube-e2b2c726b1c1c31794d324c3afd7c24e1f953131.zip |
Fix job queue tests
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/jobs.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts index 6a53e3083..0a45c33ab 100644 --- a/server/controllers/api/jobs.ts +++ b/server/controllers/api/jobs.ts | |||
@@ -26,7 +26,7 @@ jobsRouter.post('/pause', | |||
26 | jobsRouter.post('/resume', | 26 | jobsRouter.post('/resume', |
27 | authenticate, | 27 | authenticate, |
28 | ensureUserHasRight(UserRight.MANAGE_JOBS), | 28 | ensureUserHasRight(UserRight.MANAGE_JOBS), |
29 | resumeJobQueue | 29 | asyncMiddleware(resumeJobQueue) |
30 | ) | 30 | ) |
31 | 31 | ||
32 | jobsRouter.get('/:state?', | 32 | jobsRouter.get('/:state?', |
@@ -55,8 +55,8 @@ async function pauseJobQueue (req: express.Request, res: express.Response) { | |||
55 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 55 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |
56 | } | 56 | } |
57 | 57 | ||
58 | function resumeJobQueue (req: express.Request, res: express.Response) { | 58 | async function resumeJobQueue (req: express.Request, res: express.Response) { |
59 | JobQueue.Instance.resume() | 59 | await JobQueue.Instance.resume() |
60 | 60 | ||
61 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 61 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |
62 | } | 62 | } |