diff --git a/api/blueprints/mail/oauth_callback.py b/api/blueprints/mail/oauth_callback.py index b840f32..a488567 100644 --- a/api/blueprints/mail/oauth_callback.py +++ b/api/blueprints/mail/oauth_callback.py @@ -117,7 +117,7 @@ async def handle_gmail_callback() -> render_template: tokens_saved = False # In case the user cancelled halfway through (on Google's screen): - if g.inbound_data.get("error") == "access_denied": return await render_template( + if g.inbound_data.get("error") == "access_denied": return render_template( "/mail/oauth/oauth_cancelled_v2.html", mail_client = g.mail_client.title() ) @@ -147,7 +147,7 @@ async def handle_gmail_callback() -> render_template: if ( (not placeholder_token) or placeholder_token["clientUserId"]["email"] != str(tokens.email) - ): return await render_template( + ): return render_template( "/mail/oauth/oauth_failure_v2.html", mail_client = g.mail_client.title(), failure_hint = f"We were expecting authorization from '{placeholder_token['clientUserId']['email']}' but got authorization from '{tokens.email}' instead." @@ -199,13 +199,13 @@ async def handle_gmail_callback() -> render_template: ) # Return an HTML response for success: - if tokens_saved: return await render_template( + if tokens_saved: await render_template( "/mail/oauth/oauth_success_v2.html", mail_client = g.mail_client.title() ) # Return an HTML response for failure: - else: return await render_template( + else: return render_template( "/mail/oauth/oauth_failure_v2.html", mail_client = g.mail_client.title(), failure_hint = f"Unknown error. Please use log-id '{g.log_id}' to check with the support team."