Hello,
I havce a typescript nodeJS project and I have can't make my typization right!
Here is my router:
router.get("/locations", authorizedHTTP, deviceController.device_locations);
Here is my controller:
const device_locations = async (
req: Request & {userId: string},
res: Response
) => {
let result: Callback = await locationHandler({
method: req.method,
userId: req.userId,
originalUrl: req.originalUrl,
});
res.status(result.status).send({ message: result.message });
};
But I get the following error: