Skip to content

Commit

Permalink
fix some things without ids
Browse files Browse the repository at this point in the history
  • Loading branch information
chennisden committed May 30, 2024
1 parent 92a9e58 commit 0638c97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion store/app/api/crud/users.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Defines CRUD interface for user API."""

import asyncio
import uuid
import warnings

from boto3.dynamodb.conditions import Key
Expand Down Expand Up @@ -51,7 +52,7 @@ async def get_token(self, email: str) -> Token | None:

async def test_adhoc() -> None:
async with UserCrud() as crud:
await crud.add_user(User(email="[email protected]"))
await crud.add_user(User(id=str(uuid.uuid4()), email="[email protected]"))
# print(await crud.get_user("ben"))
# print(await crud.get_user_count())
# await crud.get_token("ben")
Expand Down
4 changes: 2 additions & 2 deletions store/app/api/routers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def set_token_cookie(response: Response, token: str, key: str) -> None:
value=token,
httponly=True,
secure=False,
samesite="Lax",
samesite="lax",
)


Expand Down Expand Up @@ -99,7 +99,7 @@ class UserLoginResponse(BaseModel):
async def add_to_waitlist(email: str, crud: Crud) -> None:
await asyncio.gather(
send_waitlist_email(email),
crud.add_user(User(email=email, banned=True)),
crud.add_user(User(id=str(uuid.uuid4()), email=email, banned=True)),
)


Expand Down

0 comments on commit 0638c97

Please sign in to comment.