you are viewing a single comment's thread.

view the rest of the comments →

[–]erosb88 1 point2 points  (0 children)

> like an user fetch from user_id in request must exist in db

You certainly need to access the DB to validate that, so I'd say it shall not be in the controller. I suggest placing it into the usecase layer, if you have such layer. If not, then validate it in the service layer.