Add import.video.torrent configuration
[oweals/peertube.git] / server / middlewares / validators / search.ts
index a97f5b581d8b280e0bf895844b5512c55a8613b0..e516c4c41d550befd2969ddfa5c3273752bc49e9 100644 (file)
@@ -6,7 +6,7 @@ import { isNumberArray, isStringArray, isNSFWQueryValid } from '../../helpers/cu
 import { isBooleanValid, isDateValid, toArray } from '../../helpers/custom-validators/misc'
 
 const searchValidator = [
-  query('search').not().isEmpty().withMessage('Should have a valid search'),
+  query('search').optional().not().isEmpty().withMessage('Should have a valid search'),
 
   query('startDate').optional().custom(isDateValid).withMessage('Should have a valid start date'),
   query('endDate').optional().custom(isDateValid).withMessage('Should have a valid end date'),