@@ -10,22 +10,39 @@ const router = express.Router();
1010//이사요청 목록 조회
1111router . get (
1212 "/" ,
13- passport . authenticate ( "jwt" , { session : false } ) ,
13+ // passport.authenticate("jwt", { session: false }),
1414 asyncHandle ( async ( req , res , next ) => {
1515 try {
16- const { customerId } = req . user as { customerId : number } ;
16+ // const { customerId } = req.user as { customerId: number };
1717
18- const { limit = "10" , isCompleted = "" , cursor = "0" } = req . query ;
18+ const {
19+ limit = "10" ,
20+ isDesignated = "" ,
21+ cursor = "0" ,
22+ keyword = "" ,
23+ smallMove = "false" ,
24+ houseMove = "false" ,
25+ officeMove = "false" ,
26+ orderBy = "resent" ,
27+ } = req . query ;
1928 const parseLimit = parseInt ( limit as string ) ;
2029 const parseCursor = parseInt ( cursor as string ) ;
21- const parseIsCompleted = checkBoolean ( isCompleted as string ) ;
30+ const parseIsDesignated = checkBoolean ( isDesignated as string ) ;
31+ const parseSmallMove = checkBoolean ( smallMove as string ) ;
32+ const parseHouseMove = checkBoolean ( houseMove as string ) ;
33+ const parseOfficeMove = checkBoolean ( officeMove as string ) ;
2234
2335 const movingRequestList = await movingRequestService . getMovingRequestList (
24- customerId ,
36+ 1 ,
2537 {
2638 limit : parseLimit ,
27- isCompleted : parseIsCompleted ,
39+ isDesignated : parseIsDesignated ,
2840 cursor : parseCursor ,
41+ keyword : keyword as string ,
42+ smallMove : parseSmallMove || false ,
43+ houseMove : parseHouseMove || false ,
44+ officeMove : parseOfficeMove || false ,
45+ orderBy : orderBy as string ,
2946 }
3047 ) ;
3148 return res . status ( 200 ) . send ( movingRequestList ) ;
0 commit comments