aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/jobs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/jobs.ts')
-rw-r--r--server/controllers/api/jobs.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts
index b63e2f962..c701bc970 100644
--- a/server/controllers/api/jobs.ts
+++ b/server/controllers/api/jobs.ts
@@ -4,6 +4,7 @@ import { HttpStatusCode, Job, JobState, JobType, ResultList, UserRight } from '@
4import { isArray } from '../../helpers/custom-validators/misc' 4import { isArray } from '../../helpers/custom-validators/misc'
5import { JobQueue } from '../../lib/job-queue' 5import { JobQueue } from '../../lib/job-queue'
6import { 6import {
7 apiRateLimiter,
7 asyncMiddleware, 8 asyncMiddleware,
8 authenticate, 9 authenticate,
9 ensureUserHasRight, 10 ensureUserHasRight,
@@ -17,6 +18,8 @@ import { listJobsValidator } from '../../middlewares/validators/jobs'
17 18
18const jobsRouter = express.Router() 19const jobsRouter = express.Router()
19 20
21jobsRouter.use(apiRateLimiter)
22
20jobsRouter.post('/pause', 23jobsRouter.post('/pause',
21 authenticate, 24 authenticate,
22 ensureUserHasRight(UserRight.MANAGE_JOBS), 25 ensureUserHasRight(UserRight.MANAGE_JOBS),