Toggle like endpoint
What does this MR do?
Added endpoints for users to like comments, and to check whether a comment is liked by them
toggleLike adds or removes user_id to user_liked depending on whether the id is found in the array:
Document before the request
Run the request with params in body, comment id and user id:
And this json return showing informing likes have been updated:
Document after request:
likedState either returns true or false depending on whether the user has liked the post or not. Was unsure if this was needed but maybe for like icon needing a state to check against?
the request:
the document:
the json return: