Skip to content

Commit

Permalink
make sure emails are lower when inserting and deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas.bernhard committed Nov 16, 2024
1 parent b264724 commit ea96e74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schafkopf/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def subscribe_to_schafkopf_rounds(req: SubscribeRequest) -> SubscribeResponse:
def delete_subscriber_from_mailing_list(email: str) -> SubscribeResponse:
import boto3
dynamodb = boto3.resource("dynamodb")
email_table.delete(dynamodb, email)
email_table.delete(dynamodb, email.lower())
return SubscribeResponse(email=email)


Expand Down
2 changes: 1 addition & 1 deletion schafkopf/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SubscribeRequest(BaseModel):
email: str

def to_email_item(self) -> EmailItem:
return EmailItem(email=self.email)
return EmailItem(email=self.email.lower())


class SubscribeResponse(BaseModel):
Expand Down

0 comments on commit ea96e74

Please sign in to comment.