From 825ff19af7eedea8f7a4bff3390bb730d885c43c Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 18 Aug 2026 16:57:53 +0200 Subject: [PATCH] update main.py kaasislekker --- backend/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backend/main.py b/backend/main.py index 59c1ea0..e2c84d0 100644 --- a/backend/main.py +++ b/backend/main.py @@ -29,6 +29,7 @@ from auth import ( get_user, change_password, delete_me, + reset_password, ) from permissions import ( @@ -122,6 +123,9 @@ class RoomCreate(BaseModel): pattern=r"^[A-Za-z0-9]+$", ) +class ForgotPassword(BaseModel): + email: EmailStr + class RoomSearch(BaseModel): invite_code: str @@ -1120,6 +1124,16 @@ def api_verify_email(token: str = Query(...)): """ +@app.post( + "/forgot-password", + summary="Request password reset", + description="Sends a password reset email if the email address exists.", +) +def api_forgot_password( + data: ForgotPassword, +): + return reset_password(data.email) + # easter egg @app.get(