From 082518e12e8b153d50aac8df37b4fcf8c743af54 Mon Sep 17 00:00:00 2001 From: hategan Date: Wed, 12 Feb 2025 17:29:40 -0800 Subject: [PATCH] Consistently uses dashes instead of underscores in settings and template names --- src/psij/testing/config.json | 2 +- .../testing/mailtemplates/{auth_auto.html => auth-auto.html} | 0 .../testing/mailtemplates/{auth_auto.plain => auth-auto.plain} | 0 src/psij/testing/service.py | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename src/psij/testing/mailtemplates/{auth_auto.html => auth-auto.html} (100%) rename src/psij/testing/mailtemplates/{auth_auto.plain => auth-auto.plain} (100%) diff --git a/src/psij/testing/config.json b/src/psij/testing/config.json index 66d1e50..a3f2837 100644 --- a/src/psij/testing/config.json +++ b/src/psij/testing/config.json @@ -5,7 +5,7 @@ "from": "noreply@example.org", "callback-url": "https://example.org", "body": "mailtemplates/auth", - "body_auto": "mailtemplates/auth_auto", + "body-auto": "mailtemplates/auth-auto", "exception-body": "mailtemplates/exception", "exception-approved": "mailtemplates/exception-approved", "exception-rejected": "mailtemplates/exception-rejected" diff --git a/src/psij/testing/mailtemplates/auth_auto.html b/src/psij/testing/mailtemplates/auth-auto.html similarity index 100% rename from src/psij/testing/mailtemplates/auth_auto.html rename to src/psij/testing/mailtemplates/auth-auto.html diff --git a/src/psij/testing/mailtemplates/auth_auto.plain b/src/psij/testing/mailtemplates/auth-auto.plain similarity index 100% rename from src/psij/testing/mailtemplates/auth_auto.plain rename to src/psij/testing/mailtemplates/auth-auto.plain diff --git a/src/psij/testing/service.py b/src/psij/testing/service.py index 5b0b87c..1341aea 100644 --- a/src/psij/testing/service.py +++ b/src/psij/testing/service.py @@ -715,7 +715,7 @@ def _load_email_bodies(self, file_prefix: str, params: Dict[str, str]) -> MIMEMu def _send_key_email(self, email: str, id: str, token: str, req: Optional[AuthKeyRequest]) -> None: if req: - template = 'body_auto' + template = 'body-auto' url = self.config['auth-email']['callback-url'] + '/verify?c=' + req.challenge else: template = 'body'