Implement API Calls for User-Specific Habits
Closed this issue · 2 comments
lugenx commented
We need to integrate the backend endpoints for managing user-specific habits (myHabits) in our frontend. The task involves modifying existing habit management functions to make appropriate API calls, thereby allowing users to add and remove habits from their personal list (myHabits).
Tasks:
- Revise
addHabit
andremoveHabit
functions in the Homepage component to callPOST /users/:userId/myhabits/:habitId
andDELETE /users/:userId/myhabits/:habitId
endpoints, respectively. - Implement error handling for these API calls.
- Ensure UI updates to reflect changes in myHabits after add/remove operations.
victorchrollo14 commented
Hey, lugen I'll add this up.
lugenx commented
hey @victorchrollo14 , sure, thank you, please go ahead! 👍