monitorizare-vot icon indicating copy to clipboard operation
monitorizare-vot copied to clipboard

Enhance POST endpoint for polling station info

Open aniri opened this issue 5 years ago • 2 comments

The are some small adjustments to be made to the POST ​/api​/v2​/polling-station-info :

  • change the field from the request body idPollingStation to pollingStationNumber to make the name more clear
  • when adding the new data in the DB, it should first look for the polling station by the pollingStationNumber and countyCode and 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 new PollingStationInfo entity
  • 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 avatar Oct 25 '20 14:10 aniri

@aniri this is blocked until ui is ready ?

idormenco avatar Oct 28 '20 12:10 idormenco

@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 :)

aniri avatar Oct 28 '20 18:10 aniri