]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/jobs.ts
Translated using Weblate (Arabic)
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / jobs.ts
index b57615dbcb48e1261513e40fa372819b0bbd02bc..99ef25e0a1a448b8af74cf6c7b0a1c88d44d166c 100644 (file)
@@ -6,7 +6,9 @@ import { areValidationErrors } from './utils'
 
 const listJobsValidator = [
   param('state')
-    .custom(isValidJobState).not().isEmpty().withMessage('Should have a valid job state'),
+  .optional()
+  .custom(isValidJobState).not().isEmpty().withMessage('Should have a valid job state'),
+
   query('jobType')
     .optional()
     .custom(isValidJobType).withMessage('Should have a valid job state'),