update main.py

kaasislekker
This commit is contained in:
ben
2026-08-18 16:57:53 +02:00
parent 5b5f118057
commit 825ff19af7
+14
View File
@@ -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(...)):
</html>
"""
@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(