-Created bookmark routes for our server. It's one patch method that toggles bookmark depending on if the bookmark is already added for the user or not
-Takes in user_id in the route, post or recipe id in the request json
Portions of this code that utilized AI generation
None
How to Test
Using Postman, use endpoint api/users//bookmarks
In the body tab, select raw and input JSON information. Regardless of if you are bookmarking a post or recipe, use format {"post": "post or recipe id"}. You must have "post" as field or it won't work. The post or recipe id must be an actual post or recipe in the database in the form of "posts/" or "recipes/. (I'm open to change this input format if it's easier another way)
Set postman to a PATCH method and send request.
If the bookmark is already in the users "bookmarks" field, it will be removed. If it's not in the "bookmarks" field, it will be added. Both are done with the PATCH method.
Unit Tests currently in development
Checklist
[x] I have added/updated relevant documentation, and I have followed the coding style guidelines.
[x] I have checked for any potential conflicts with other branches and fixed any merge conflicts.
Description / Changes Made
-Created bookmark routes for our server. It's one patch method that toggles bookmark depending on if the bookmark is already added for the user or not -Takes in user_id in the route, post or recipe id in the request json
Portions of this code that utilized AI generation
None
How to Test
Unit Tests currently in development
Checklist