Refactor the 'GET /user/:id' route. Create a new function in order to make the code more readable.