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

Bulk import votes #38

Closed
hgwood opened this issue Oct 5, 2018 · 3 comments
Closed

Bulk import votes #38

hgwood opened this issue Oct 5, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@hgwood
Copy link
Member

hgwood commented Oct 5, 2018

Create a new HTTP function that takes a JSON array of votes and inserts them into the database. The function should be protected by the admin key. Open question: should the payload be validated?

@hgwood hgwood added the enhancement New feature or request label Oct 5, 2018
@Ked57
Copy link
Contributor

Ked57 commented Oct 5, 2018

Is it to be used for the migration of the old database ?

@hgwood
Copy link
Member Author

hgwood commented Oct 8, 2018

Yes.

Ked57 added a commit that referenced this issue Oct 16, 2018
@Ked57
Copy link
Contributor

Ked57 commented Oct 16, 2018

Right now importing votes will trigger send email to manager. This is not intended.
We decided to modify castVote and the vote interface to have an optional field "vote_from_ui", and sendEmailToManager to check if that field exists so it doesn't send emails when importing votes

Ked57 added a commit that referenced this issue Oct 16, 2018
Ked57 added a commit that referenced this issue Oct 25, 2018
* Add import votes (not tested)

* Finalise import votes function

see #38

* forgot something

* Fixed CircleCi import

It still won't work until compute-stats and this branch are merged into master

* Fixed import calling sendEmailToManager

See #38

* Add some comments over the new field of vote

* Forgot to remove a console.info

* Fix review !

* Fix linting

* fix review
@Ked57 Ked57 closed this as completed Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants