lugenx/ecohabit

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:

  1. Revise addHabit and removeHabit functions in the Homepage component to call POST /users/:userId/myhabits/:habitId and DELETE /users/:userId/myhabits/:habitId endpoints, respectively.
  2. Implement error handling for these API calls.
  3. Ensure UI updates to reflect changes in myHabits after add/remove operations.

Hey, lugen I'll add this up.

lugenx commented

hey @victorchrollo14 , sure, thank you, please go ahead! 👍