diff options
Diffstat (limited to 'server/controllers/api/jobs.ts')
-rw-r--r-- | server/controllers/api/jobs.ts | 3 |
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 '@ | |||
4 | import { isArray } from '../../helpers/custom-validators/misc' | 4 | import { isArray } from '../../helpers/custom-validators/misc' |
5 | import { JobQueue } from '../../lib/job-queue' | 5 | import { JobQueue } from '../../lib/job-queue' |
6 | import { | 6 | import { |
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 | ||
18 | const jobsRouter = express.Router() | 19 | const jobsRouter = express.Router() |
19 | 20 | ||
21 | jobsRouter.use(apiRateLimiter) | ||
22 | |||
20 | jobsRouter.post('/pause', | 23 | jobsRouter.post('/pause', |
21 | authenticate, | 24 | authenticate, |
22 | ensureUserHasRight(UserRight.MANAGE_JOBS), | 25 | ensureUserHasRight(UserRight.MANAGE_JOBS), |