Skip to content

Commit bd0f996

Browse files
committed
feat: add NomineeApplicationModel
1 parent f100add commit bd0f996

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/elections/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ class NomineeInfoModel(BaseModel):
2525
instagram: str
2626
email: str
2727
discord_username: str
28+
29+
class NomineeApplicationModel(BaseModel):
30+
computing_id: str
31+
nominee_election: str
32+
position: str
33+
speech: str

src/elections/urls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import elections
99
import elections.crud
1010
import elections.tables
11-
from elections.models import ElectionModel, NomineeInfoModel
11+
from elections.models import ElectionModel, NomineeApplicationModel, NomineeInfoModel
1212
from elections.tables import Election, NomineeApplication, NomineeInfo, election_types
1313
from officers.constants import OfficerPosition
1414
from officers.crud import get_active_officer_terms
@@ -347,7 +347,8 @@ async def delete_election(
347347

348348
@router.get(
349349
"/registration/{election_name:str}",
350-
description="get your election registration(s)"
350+
description="get your election registration(s)",
351+
response_model=list[NomineeApplicationModel]
351352
)
352353
async def get_election_registrations(
353354
request: Request,

0 commit comments

Comments
 (0)