Answer the question
In order to leave comments, you need to log in
Should I make a separate route for the REST API to change the publication status of an article?
For moderation on the site in the admin panel, you need to be able to view and moderate articles created by users (editing from the admin panel is not planned yet - you just need to change one field - the moderation status).
Advise how it would be more correct:
1) to create a separate route for the "change status" action, for example:
POST: https://site.test/api/v1/admin/article/1/status
{
"status": "published"
}
PUT: https://site.test/api/v1/admin/article/1
{
"status": "unpublished"
}
3) возможно есть другие варианты?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question