I started writing a project in Spring Boot and faced such a problem as writing endpoints for the user and administrator.
What is the best way to do it?
GET online-shop/products and check every time the client is an admin or a client.
or make a separate endpoint for the admin
GET online-shop/admin/products
I tried to start doing this, but I realize that the program will start to grow more and more and I need an alternative solution.
vlasosik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.