feat: replace email flows with in-app notifications
Add recipient notification detail and filtering, a queued admin composer, and contextual automatic titles. Retire email delivery, obsolete auth routes, newsletter data, and related templates and settings.
This commit is contained in:
@@ -369,34 +369,6 @@ def google_oauth_claim_verify(request, data: GoogleClaimVerifySchema):
|
||||
return _error_response(exc)
|
||||
|
||||
|
||||
@auth_router.get("/verify-email/{token}", response=MessageSchema)
|
||||
def verify_email_legacy_guidance(request, token: str):
|
||||
return {
|
||||
"message": "تایید ایمیل غیرفعال شده است. برای بازیابی حساب از ورود با گوگل یا تایید شماره موبایل استفاده کنید."
|
||||
}
|
||||
|
||||
|
||||
@auth_router.post("/resend-verification", response=MessageSchema)
|
||||
def resend_verification_legacy_guidance(request, email: str):
|
||||
return {
|
||||
"message": "ارسال ایمیل تایید غیرفعال شده است. برای ادامه، شماره موبایل خود را ثبت یا از ورود با گوگل استفاده کنید."
|
||||
}
|
||||
|
||||
|
||||
@auth_router.post("/request-password-reset", response=MessageSchema)
|
||||
def request_password_reset_legacy_guidance(request):
|
||||
return {
|
||||
"message": "بازیابی رمز عبور با ایمیل غیرفعال شده است. از بازیابی با کد پیامکی یا ورود با گوگل استفاده کنید."
|
||||
}
|
||||
|
||||
|
||||
@auth_router.post("/reset-password-confirm", response=MessageSchema)
|
||||
def reset_password_confirm_legacy_guidance(request):
|
||||
return {
|
||||
"message": "لینک بازیابی ایمیلی غیرفعال شده است. لطفاً از بازیابی رمز عبور با موبایل استفاده کنید."
|
||||
}
|
||||
|
||||
|
||||
@auth_router.get("/profile", response=UserProfileSchema, auth=jwt_auth)
|
||||
def get_profile(request):
|
||||
return request.auth
|
||||
@@ -433,7 +405,7 @@ def update_profile(request, data: UserUpdateSchema):
|
||||
if existing.exists():
|
||||
return 400, {"error": "این ایمیل قبلاً ثبت شده است."}
|
||||
payload["email"] = normalized_email
|
||||
payload["is_email_verified"] = False if normalized_email else False
|
||||
payload["is_email_verified"] = bool(normalized_email)
|
||||
|
||||
for field, value in payload.items():
|
||||
setattr(user, field, value)
|
||||
|
||||
Reference in New Issue
Block a user