mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-02 10:13:35 -05:00
* add password reset token endpoint to the admin panel * add None check on token * add localization message for passowrd reset link button
36 lines
573 B
Python
36 lines
573 B
Python
from pydantic import UUID4
|
|
|
|
from mealie.schema._mealie import MealieModel
|
|
|
|
from .user import PrivateUser
|
|
|
|
|
|
class ForgotPassword(MealieModel):
|
|
email: str
|
|
|
|
|
|
class PasswordResetToken(MealieModel):
|
|
token: str
|
|
|
|
|
|
class ValidateResetToken(MealieModel):
|
|
token: str
|
|
|
|
|
|
class ResetPassword(ValidateResetToken):
|
|
email: str
|
|
password: str
|
|
passwordConfirm: str
|
|
|
|
|
|
class SavePasswordResetToken(MealieModel):
|
|
user_id: UUID4
|
|
token: str
|
|
|
|
|
|
class PrivatePasswordResetToken(SavePasswordResetToken):
|
|
user: PrivateUser
|
|
|
|
class Config:
|
|
orm_mode = True
|