Answer the question
In order to leave comments, you need to log in
How to organize such moments in api?
In the api, for example, I have two mass actions, this is to hide all user comments and delete the user's likes
. In api, is this done on two different rests? Or on the client should I first get all the comments of the user and then just change it as it should and send it to one rest that just updates the array of comments?
just wondering what kind of rules should be for such moments
Answer the question
In order to leave comments, you need to log in
Extend the existing methods by adding the = *(asterisk) parameter to the methods, i.e. apply the action to everything that the API user has access to. Previously
:
DELETE /api/comments?id=[1,2,5] //удалить комменты 1,2,5
Now:
DELETE /api/comments ?id=[*]//удалить все комменты
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question