monitorizare-vot
monitorizare-vot copied to clipboard
Enhance POST endpoint for polling station info
The are some small adjustments to be made to the POST /api/v2/polling-station-info :
- change the field from the request body
idPollingStationtopollingStationNumberto make the name more clear - when adding the new data in the DB, it should first look for the polling station by the
pollingStationNumberandcountyCodeand should throw 404 if not found. if found, it should save its DB id and the other info from the request body in the PollingStationInfos table and return the id of the newPollingStationInfoentity - please make the changes so multiple entries could be saved in the DB for the same observer / polling station combination. there's currently a constraint that prevents this
Please make sure not to affect the previous v1/polling-station functionality.
@aniri this is blocked until ui is ready ?
@idormenco I don't think there will be many changes to this after the new UI is ready, so it can be implemented now and we can do any small tweaks later if needed :)