diff --git a/schafkopf/api/api.py b/schafkopf/api/api.py index 64e0a1e..04bfbf3 100644 --- a/schafkopf/api/api.py +++ b/schafkopf/api/api.py @@ -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) diff --git a/schafkopf/api/models.py b/schafkopf/api/models.py index 1acf052..a14da3f 100644 --- a/schafkopf/api/models.py +++ b/schafkopf/api/models.py @@ -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):