Problem
The GET /users/:id endpoint currently sends a response even when
the requested user does not exist.
It should properly handle the "user not found" case.
Current Behavior
- Returns an empty or incorrect response
- Does not use proper HTTP status code
Expected Behavior
- If user is not found, return:
- Status code: 404
- JSON message explaining the error
- Ensure only one response is sent
File to Update
controllers/user.controller.js