diff --git a/app/dashboard/views/index.py b/app/dashboard/views/index.py index 829f1702..8422b06d 100644 --- a/app/dashboard/views/index.py +++ b/app/dashboard/views/index.py @@ -52,13 +52,13 @@ def get_stats(user: User) -> Stats: @dashboard_bp.route("/", methods=["GET", "POST"]) +@login_required @limiter.limit( ALIAS_LIMIT, methods=["POST"], exempt_when=lambda: request.form.get("form-name") != "create-random-email", ) @limiter.limit("10/minute", methods=["GET"], key_func=lambda: current_user.id) -@login_required @parallel_limiter.lock( name="alias_creation", only_when=lambda: request.form.get("form-name") == "create-random-email", diff --git a/pyproject.toml b/pyproject.toml index f5bccebe..9a6dff89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ exclude = ''' [tool.ruff] ignore-init-module-imports = true +exclude = [".venv", "migrations"] [tool.djlint] indent = 2 diff --git a/templates/dashboard/unsubscribe.html b/templates/dashboard/unsubscribe.html index 1866a307..9a20cf5c 100644 --- a/templates/dashboard/unsubscribe.html +++ b/templates/dashboard/unsubscribe.html @@ -11,7 +11,9 @@ You are about to deactivate the alias {{ alias }}
-After this, you will stop receiving all emails sent to this alias, please confirm. You will always be able to re-activate it untill you will decide to delete it.
++ After this, you will stop receiving all emails sent to this alias, please confirm. You will always be able to re-activate it untill you will decide to delete it. +
diff --git a/templates/footer.html b/templates/footer.html index 0a77fc32..6a2bc23d 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -37,7 +37,6 @@ alt="GitHub"> -