N
N
Nikita2020-11-25 14:10:33
RESTful API
Nikita, 2020-11-25 14:10:33

What is the best way to arrange routes in the REST API?

The application has users, there are articles. What is the best way to implement the ability to delete, edit articles: through the path /posts (delete, put, patch) and check if the user is the author of this post. Or move it to /me and leave /posts for admins only? Or, on the /me path, only get user data and update data such as bio, name, email, etc.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question