@@ -99,7 +99,9 @@ async def update_user(
9999 status_code = 200 ,
100100)
101101async def get_user (
102- request : Request , user : int = Path (description = "The ID of the user to get." ), postgres_session : AsyncSession = Depends (get_postgres_session )
102+ request : Request ,
103+ user : int = Path (description = "The ID of the user to get." ),
104+ postgres_session : AsyncSession = Depends (get_postgres_session ),
103105) -> JSONResponse :
104106 """
105107 Get a user by id.
@@ -119,6 +121,7 @@ async def get_users(
119121 request : Request ,
120122 role : int | None = Query (default = None , description = "The ID of the role to filter the users by." ),
121123 organization : int | None = Query (default = None , description = "The ID of the organization to filter the users by." ),
124+ email : str | None = Query (default = None , description = "The email of the user to filter the users by." ),
122125 offset : int = Query (default = 0 , ge = 0 , description = "The offset of the users to get." ),
123126 limit : int = Query (default = 10 , ge = 1 , le = 100 , description = "The limit of the users to get." ),
124127 order_by : Literal ["id" , "name" , "created" , "updated" ] = Query (default = "id" , description = "The field to order the users by." ),
@@ -133,6 +136,7 @@ async def get_users(
133136 postgres_session = postgres_session ,
134137 role_id = role ,
135138 organization_id = organization ,
139+ email = email ,
136140 offset = offset ,
137141 limit = limit ,
138142 order_by = order_by ,
0 commit comments