Skip to content

Commit 0e4ab4c

Browse files
authored
Merge branch 'main' into chore/upgrade-1.0.2
2 parents 05c2119 + 9b896c9 commit 0e4ab4c

File tree

4 files changed

+55
-49
lines changed

4 files changed

+55
-49
lines changed

app/api/v1/mediator/tracker.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
from typing import Any
22
from electionguard.group import ElementModQ
33
from electionguard.serializable import read_json_object
4-
from electionguard.tracker import tracker_hash_to_words, tracker_words_to_hash
4+
from electionguard.tracker import tracker_hash_to_words
55
from fastapi import APIRouter, Body
66

77
from ..models import (
8-
TrackerHash,
9-
TrackerHashRequest,
108
TrackerWords,
119
TrackerWordsRequest,
1210
)
@@ -15,16 +13,6 @@
1513
router = APIRouter()
1614

1715

18-
@router.post("/hash", tags=[UTILITY])
19-
def convert_tracker_to_hash(request: TrackerHashRequest = Body(...)) -> Any:
20-
"""
21-
Convert tracker from human readable / friendly words to hash
22-
"""
23-
24-
tracker_hash = tracker_words_to_hash(request.tracker_words, request.seperator)
25-
return TrackerHash(tracker_hash=str(tracker_hash))
26-
27-
2816
@router.post("/words", tags=[UTILITY])
2917
def convert_tracker_to_words(request: TrackerWordsRequest = Body(...)) -> Any:
3018
"""

app/api/v1/models/tracker.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
__all__ = [
55
"TrackerWordsRequest",
66
"TrackerWords",
7-
"TrackerHashRequest",
8-
"TrackerHash",
97
]
108

119

@@ -16,12 +14,3 @@ class TrackerWordsRequest(Base):
1614

1715
class TrackerWords(Base):
1816
tracker_words: str
19-
20-
21-
class TrackerHashRequest(Base):
22-
tracker_words: str
23-
seperator: str = DEFAULT_SEPERATOR
24-
25-
26-
class TrackerHash(Base):
27-
tracker_hash: str

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/postman/ElectionGuard Web Api.postman_collection.json

Lines changed: 51 additions & 22 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)