gcivil-nyu-org / team-5-inperson

3 stars 4 forks source link

Userprofile be suyash #180

Closed TheHarbinger99 closed 1 year ago

TheHarbinger99 commented 1 year ago

backend for userprofile functionality is done

2 components : user can see user's 1] bookmarks and 2]reviews just need to pass username.

api call for bookmark:

api/user_bookmarks// (enter username for )

example: http://127.0.0.1:8000/NycBasics/api/user_bookmarks/hi1

result: { "id": 1, "amenity_type": "wifi", "amenity_id": 34, "is_bookmarked": false, "user": 105 }

api call for user reviews:

api/user_reviews// (enter username for )

example: http://127.0.0.1:8000/NycBasics/api/user_reviews/aks123

result: { "id": 139, "amenity_type": "water", "amenity_id": 5800, "rating": 4, "review": "Nice Spot!", "is_flagged": true, "is_deleted": false, "upvotes": 1, "downvotes": 1, "user": 5 }