aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/cli
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/cli.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/webmentions_ssg/cli.py b/webmentions_ssg/cli.py
index 225a39f..3448bbb 100644
--- a/webmentions_ssg/cli.py
+++ b/webmentions_ssg/cli.py
@@ -18,6 +18,8 @@ from .extensions import db, mail
from .models import User
USERS_CLI = AppGroup("users", help="Manage users.")
+MAIL_CLI = AppGroup("mail", help="Handle mail")
+DB_CLI = AppGroup("db", help="Handle database")
def _get_user_or_fail(username: str):
@@ -118,9 +120,6 @@ def delete_user(username: str, yes: bool) -> None:
click.echo(f"Deleted user {username!r}.")
-MAIL_CLI = AppGroup("mail", help="Handle mail")
-
-
@MAIL_CLI.command("test", help="Send an email to test the SMTP configuration")
@click.option("--to", "recipient", help="Recipient address (defaults to DIGEST_EMAIL).")
def send_test_mail(recipient: str | None) -> None:
@@ -157,9 +156,6 @@ def send_test_mail(recipient: str | None) -> None:
click.echo(f"Test email sent to {recipient}.")
-DB_CLI = AppGroup("db", help="Handle database")
-
-
def _existing_table_names() -> set[str]:
"""Return existing table names without modifying the database schema.