UNLV-CS472-672 / 2024-S-GROUP5-Munch

The Munch app is a social platform where users create profiles by selecting preferred foods.
1 stars 11 forks source link

Comments API #70

Closed noodaj closed 5 months ago

noodaj commented 5 months ago

Is your feature request related to a problem? Please describe. Need an API route that adds a new comment into a post Need an API route that deletes a comment

Describe the solution you'd like

For creation

An API that adds a comment into the post. The post should have a new entry in the comments array with the data being passed with the schema. We will pass in the post_id and the required info. Return some type of success code.

author: string (reference)
username: string 
comment: string
creation_date: string

For delete

An API that deletes the comment from a post Check google sheet for more info.

Describe alternatives you've considered None

Additional context For deletion, I'm not sure if we have a comment_id that will make it easy for us to delete. Can either limit to 1 comment per user per post (not ideal) or do a linear search using user_id and all the comments they wrote (also not ideal).