Next response object requires you to call json or send for the response to actually be sent.
Loading circle was added when the update button was clicked, and was abstracted to it's own component
Alerting/Validating
Alert when candidate name is empty
Alert when maxCandidateCount is higher than candidate list length
Alert when both are bad
Poll creation and update validation was moved to a shared utlis file at toplevel. If we wish to use it for the frontend, we could try to use the same logic, though we would need to make some adjustments to know which fields in the frontend to mark as "invalid" like specifying the indexes of which candidate names are empty etc.
Deleting
On both createPoll and updatePoll, delete buttons were added
Description
Makes the update and create polls logic better
Loading
Next response object requires you to call
json
orsend
for the response to actually be sent. Loading circle was added when the update button was clicked, and was abstracted to it's own componentAlerting/Validating
Poll creation and update validation was moved to a shared utlis file at toplevel. If we wish to use it for the frontend, we could try to use the same logic, though we would need to make some adjustments to know which fields in the frontend to mark as "invalid" like specifying the indexes of which candidate names are empty etc.
Deleting
On both createPoll and updatePoll, delete buttons were added