simplifications and refactorings
This commit is contained in:
@@ -16,7 +16,7 @@ from media_library_viewer_api.dependencies import (
|
||||
get_jellyseerr_client,
|
||||
get_mail_queue,
|
||||
)
|
||||
from media_library_viewer_api.services.mailer import EmailAttachment, test_smtp_connection, validate_smtp_settings
|
||||
from media_library_viewer_api.services.mailer import EmailAttachment, validate_smtp_settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -287,13 +287,6 @@ def get_user_message_status(mail_queue=Depends(get_mail_queue)) -> dict[str, Any
|
||||
return mail_queue.status()
|
||||
|
||||
|
||||
@router.post("/message/test-smtp")
|
||||
def test_user_message_smtp() -> dict[str, Any]:
|
||||
"""Test the configured SMTP connection without sending an email."""
|
||||
settings = get_settings()
|
||||
return test_smtp_connection(settings)
|
||||
|
||||
|
||||
@router.post("/message", status_code=status.HTTP_202_ACCEPTED)
|
||||
async def post_user_message(
|
||||
recipient_ids: str = Form(...),
|
||||
|
||||
Reference in New Issue
Block a user