From a simple list, I tap on an item and display a detail page.
I have a simple “heart” icon to indicate “Favorite” status for this item.
I’m unsure of the logic to toggle the heart icon to “filled” instead of “outline” (obviously, I know I’m displaying two different icons based on a field value).
I plan to have the user Tap on the heart icon on the form.
I have a FavToggle endpoint which accepts my AuthToken and the ItemID to toggle. Database gets updated correctly, I just don’t know what my reply is supposed to be.
MY Q IS What is supposed to be returned by my FavToggle endpoint?
… and then what do I do to update the screen so the icon changes?
Since I was on an “Item” display page, do I return the entire Item record again as the result (item record includes a field for FavoriteYN? Or can I just return a true/false for the current FavButton status for that item?