With updated endpoints and forms after commit 2540510, there are some implied considerations:
To turn a habit into a challenge, that could be a button for a habit, so when submitting the form to the server, the base_habit should be automatically completed using the selected habit's id.
When a user creates a habit and select a habit_type, the backend is designed to recieve an ID of the selected habit_type. There will be an endpoint to return all available habit types, as JSON objects [{id: 1, type:"Running"},...]. So when prompting the user with a dropdown to selecte a type, this list of available habit types should have been retrieved and saved already. This dropdown can display the type name only, and when submitting the form it's mapped id will be actually submitted.
Hi, I am able to get the habit_type as you indicate above. But in term of getting base_habit, I manually create data to test but it seems that It cannot get that for now.
With updated endpoints and forms after commit 2540510, there are some implied considerations:
base_habit
should be automatically completed using the selected habit's id.