Build an API that shows a user's order list. Find the user, find that user's orders, and respond with JSON. Complete the GET /users/:id/orders route inside registerUserOrdersRoutes. Note: find the user with userRepo.findUserById and the orders with orderRepo.findByUser.
Complete an Express + TypeScript API that returns a user's order list. Inside the GET /users/:id/orders route, find the user and that user's orders and respond with JSON. Leave the stores and the app's global handler exactly as given and fill in just the one route.
An Express route handler can be synchronous or asynchronous (async). An async handler can await work — like a store lookup — before it responds. This problem is about building such a route: inside GET /users/:id/orders, await the user lookup and that user's orders, then respond with JSON. The habit that matters is wiring the awaited lookups through to a clean JSON response for the normal order list.