diff --git a/store/app/api/crud/users.py b/store/app/api/crud/users.py index 3c74871b..56491f45 100644 --- a/store/app/api/crud/users.py +++ b/store/app/api/crud/users.py @@ -1,6 +1,7 @@ """Defines CRUD interface for user API.""" import asyncio +import uuid import warnings from boto3.dynamodb.conditions import Key @@ -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="ben@kscale.dev")) + await crud.add_user(User(id=str(uuid.uuid4()), email="ben@kscale.dev")) # print(await crud.get_user("ben")) # print(await crud.get_user_count()) # await crud.get_token("ben") diff --git a/store/app/api/routers/users.py b/store/app/api/routers/users.py index 0e89227f..ffe4a702 100644 --- a/store/app/api/routers/users.py +++ b/store/app/api/routers/users.py @@ -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", ) @@ -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)), )