From 305ce38379a6445121acf6c41d082f1aa7e19563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Mon, 14 Feb 2022 11:19:03 +0100 Subject: [PATCH] PR changes --- app/dashboard/views/support.py | 7 +++---- templates/dashboard/support.html | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/dashboard/views/support.py b/app/dashboard/views/support.py index 188bb36e..6315bf68 100644 --- a/app/dashboard/views/support.py +++ b/app/dashboard/views/support.py @@ -10,7 +10,6 @@ from werkzeug.datastructures import FileStorage from app.dashboard.base import dashboard_bp from app.extensions import limiter from app.log import LOG -from app.models import Mailbox from app.config import ZENDESK_HOST, ZENDESK_API_TOKEN VALID_MIME_TYPES = ["text/plain", "message/rfc822"] @@ -28,9 +27,9 @@ def show_support_dialog(): def check_zendesk_response_status(response_code: int) -> bool: if response_code != 201: if response_code in (401, 422): - LOG.error("Could not authenticate") + LOG.e("Could not authenticate") else: - LOG.error("Problem with the request. Status {}".format(response_code)) + LOG.e("Problem with the request. Status {}".format(response_code)) return False return True @@ -79,7 +78,7 @@ def create_zendesk_request(email: str, content: str, files: [FileStorage]) -> bo response = requests.post(url, data=json.dumps(data), headers=headers, auth=auth) if not check_zendesk_response_status(response.status_code): return False - LOG.debug("Ticket created") + LOG.d("Ticket created") return True diff --git a/templates/dashboard/support.html b/templates/dashboard/support.html index e1f87d86..ca4bf758 100644 --- a/templates/dashboard/support.html +++ b/templates/dashboard/support.html @@ -50,16 +50,16 @@
Report a problem
-
+
If an email cannot be delivered to your mailbox, please check your notifications for error messages
-
+
A support ticket will be created in Zendesk. Please do not include any sensitive information in the ticket.
- +
Attach files to support request @@ -76,7 +76,7 @@ Conversations related to this ticket will be sent to this address. Feel free to use an alias here.
- +