Skip to content

✨ New Election context endpoint, remove description endpoint - #101

Merged
keithrfung merged 1 commit into
mainfrom
feature/context-endpoint
Sep 18, 2020
Merged

keithrfung merged 1 commit into
mainfrom
feature/context-endpoint

Conversation

@rkorsak

@rkorsak rkorsak commented Sep 18, 2020 •

Copy link
Copy Markdown
Contributor

Issue

Closes #100
Closes #97

Description

🔥 Removes the /api/v1/election/description endpoint

✨ New mediator endpoint:
POST /api/v1/election/context

Request

{
  "description": {/* standard election description */},
  "elgamal_public_key": "<result of combining public keys>",
  "number_of_guardians": 5,
  "quorum": 3
}

Response

{
    "crypto_base_hash": "<base hash>",
    "crypto_extended_base_hash": "<extended base hash>",
    "description_hash": "<description hash>",
    "elgamal_public_key": "<public key from the request>",
    "number_of_guardians": 5,
    "quorum": 3
}

Testing

Added a test to Postman

Checklist

🚨Please review the guidelines for contributing to this repository.

  • 🤔 CONSIDER adding a unit test if your PR resolves an issue.
  • ✅ DO check open PR's to avoid duplicates.
  • ✅ DO keep pull requests small so they can be easily reviewed.
  • ✅ DO build locally before pushing.
  • ✅ DO make sure tests pass.
  • ✅ DO make sure any new changes are documented.
  • ✅ DO make sure not to introduce any compiler warnings.
  • ❌AVOID breaking the continuous integration build.
  • ❌AVOID making significant changes to the overall architecture.

💙 Thank you!

@rkorsak
rkorsak requested a review from keithrfung September 18, 2020 19:10
@rkorsak rkorsak changed the title ✨ New Election context endpoint ✨ New Election context endpoint, remove description endpoint Sep 18, 2020

@keithrfung keithrfung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect.

@keithrfung
keithrfung merged commit 371c358 into main Sep 18, 2020
@keithrfung
keithrfung deleted the feature/context-endpoint branch September 18, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create election context endpoint 🔥 Remove electionguard description endpoint

2 participants