@@ -64,7 +64,7 @@ photoRouter.get(
6464
6565photoRouter . post (
6666 '/search' ,
67- [ body ( 'page' ) . isUUID ( ) . default ( 1 ) ] ,
67+ [ body ( 'page' ) . isInt ( ) . default ( 1 ) ] ,
6868 async ( req : Request , res : Response ) => {
6969 const { query, sort, page } = req . body ;
7070
@@ -280,7 +280,7 @@ photoRouter.put(
280280 '/:id' ,
281281 multer ( ) . single ( 'file' ) ,
282282 [
283- check ( 'id' ) . notEmpty ( ) . isInt ( ) ,
283+ check ( 'id' ) . notEmpty ( ) . isUUID ( ) ,
284284 body ( 'communityId' ) . notEmpty ( ) . bail ( ) . isInt ( ) ,
285285 body ( 'isOtherRecord' ) . notEmpty ( ) . bail ( ) . isBoolean ( ) ,
286286 body ( 'originalMediaId' ) . notEmpty ( ) . bail ( ) . isInt ( ) ,
@@ -351,7 +351,7 @@ photoRouter.put(
351351photoRouter . post (
352352 '/saved-filter' ,
353353 [
354- body ( 'userId' ) . notEmpty ( ) . isUUID ( ) ,
354+ body ( 'userId' ) . notEmpty ( ) . isInt ( ) ,
355355 body ( 'name' ) . notEmpty ( ) . bail ( ) . isString ( ) ,
356356 body ( 'resultType' ) . notEmpty ( ) . bail ( ) . isString ( ) ,
357357 body ( 'value' ) . notEmpty ( ) . bail ( ) . isString ( ) ,
@@ -378,7 +378,7 @@ photoRouter.post(
378378
379379photoRouter . delete (
380380 '/saved-filter/:id' ,
381- [ check ( 'id' ) . isUUID ( ) . notEmpty ( ) ] ,
381+ [ check ( 'id' ) . isInt ( ) . notEmpty ( ) ] ,
382382 async ( req : Request , res : Response ) => {
383383 const errors = validationResult ( req ) ;
384384
@@ -394,7 +394,7 @@ photoRouter.delete(
394394
395395photoRouter . get (
396396 '/saved-filter/user/:id' ,
397- [ check ( 'id' ) . notEmpty ( ) . isUUID ( ) ] ,
397+ [ check ( 'id' ) . notEmpty ( ) . isInt ( ) ] ,
398398 async ( req : Request , res : Response ) => {
399399 const errors = validationResult ( req ) ;
400400
0 commit comments