Skip to content

Commit 6c396c0

Browse files
committedDec 24, 2023
Security Fixes
1 parent 29f1064 commit 6c396c0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed
 

‎.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AWS_ACCESS_KEY_ID=<key with access to ECS>
2+
AWS_SECRET_ACCESS_KEY=
3+
AUTH_TOKEN=<Enter admin matrix access token here>

‎dev.db

Whitespace-only changes.

‎main.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class Item(BaseModel):
3535
agent_id: str
3636
profile: str
3737

38+
class Users(BaseModel):
39+
email_id: str
40+
bot_username: str
41+
agent_name: str
42+
3843

3944
class UserCreate(BaseModel):
4045
username: str
@@ -104,11 +109,11 @@ async def delete_item(item: Item, username: str = Path(..., title="The username"
104109

105110

106111
@app.get("/list/{username}")
107-
async def get_list(username: str = Path(..., title="The username", description="Username of the user")):
112+
async def get_list(username: str = Path(..., title="The username", description="Username of the user")) -> list[Users]:
108113
get_email = get_email_from_username(username)
109114
if get_email is not None:
110115
items = await prisma.user.find_many(where={
111-
'username': get_email
116+
'email_id': get_email
112117
})
113118
return items
114119
return []

0 commit comments

Comments
 (0)
Please sign in to comment.