File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 77from registrations .tables import NomineeApplication
88
99
10+ async def get_all_registrations (
11+ db_session : AsyncSession
12+ ) -> Sequence [NomineeApplication ]:
13+ registrations = (await db_session .scalars (
14+ sqlalchemy
15+ .select (NomineeApplication )
16+ )).all ()
17+ return registrations
18+
1019async def get_all_registrations_of_user (
1120 db_session : AsyncSession ,
1221 computing_id : str ,
Original file line number Diff line number Diff line change 2525 tags = ["registration" ],
2626)
2727
28+ @router .get (
29+ "" ,
30+ description = "get all the registrations" ,
31+ response_model = list [NomineeApplicationModel ],
32+ operation_id = "get_registrations"
33+ )
34+ async def get_all_registrations (
35+ db_session : database .DBSession ,
36+ ):
37+ return await registrations .crud .get_all_registrations (db_session )
38+
2839@router .get (
2940 "/{election_name:str}" ,
3041 description = "get all the registrations of a single election" ,
You can’t perform that action at this time.
0 commit comments