Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance POST endpoint for polling station info #334

Open
aniri opened this issue Oct 25, 2020 · 2 comments
Open

Enhance POST endpoint for polling station info #334

aniri opened this issue Oct 25, 2020 · 2 comments

Comments

@aniri
Copy link
Member

aniri commented Oct 25, 2020

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.

@idormenco
Copy link
Member

@aniri this is blocked until ui is ready ?

@aniri
Copy link
Member Author

aniri commented Oct 28, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants