An instance of the user model is being used to type the server response both on the client and the server side. This is likely to cause issues as the client and/or controller would have a hard dependency on the user model and the data storage layer which it interacts with.
Instead a separate DTO (or DTOs) should be used to describe the structure of the data as it crosses process boundaries.
An instance of the user model is being used to type the server response both on the client and the server side. This is likely to cause issues as the client and/or controller would have a hard dependency on the user model and the data storage layer which it interacts with.
Instead a separate DTO (or DTOs) should be used to describe the structure of the data as it crosses process boundaries.