Open tkserver opened 7 years ago
For the edit part, that would consists of a GET so you can leave the author, moderator or keymaster edit. Then you should launch a POST to the topic or reply routes that already exist. Things to change would be that the POST needs to accept an ID. If there is no ID given, it's a new topic/reply, if there is an ID, then depends of the permissions the logged on user has, the system should update the topic/reply.
Update or edit topic/reply. On the front end of my app I would be cross referencing the author ID with the current logged in user's ID to know whether or not to enable the edit function of a topic or reply. Of course an admin should be able to edit or even spam/delete a topic or reply.