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

Creating Comment API Routes and Helper Function for Generating unique IDs #76

Closed haiimkeith closed 5 months ago

haiimkeith commented 5 months ago

Description / Changes Made

Portions of this code that utilized AI generation

AI was used to find a method to create proper formatting for current time that is utilized in creation of the comment, as well as helping create the helper function that generates a unique ID!

How to Test

(Assuming Postman is being used)

  1. Use endpoint including "/api/posts/comment//" to create a new comment
  2. Go to body tab, then click raw, then insert JSON information. For this test, you can just use {"comment": "Any Comment"} as an example
  3. Make sure Postman is set to PATCH request and send request.
  4. If using delete functionality, endpoint would be "/api/posts/comment///"
  5. Make sure Postman is set to DELETE request and send request.

Checklist

rparker2003 commented 5 months ago

I reviewed the comment_routes.py file and it looks great! This route will let us add and delete comments, which will let us further develop the comments page in the front end. Great work!