1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-11 21:03:03 +00:00

Code cosmetics

Bugfix missing bleach tags (#3080)
Bugfix pdfreader
This commit is contained in:
Ozzie Isaacs
2024-06-18 20:13:26 +02:00
parent f7d5480811
commit 64e4a1155c
47 changed files with 322 additions and 228 deletions

View File

@@ -135,7 +135,7 @@ def bind_oauth_or_register(provider_id, provider_user_id, redirect_url, provider
if oauth_entry.user:
login_user(oauth_entry.user)
log.debug("You are now logged in as: '%s'", oauth_entry.user.name)
flash(_("Success! You are now logged in as: %(nickname)s", nickname= oauth_entry.user.name),
flash(_("Success! You are now logged in as: %(nickname)s", nickname=oauth_entry.user.name),
category="success")
return redirect(url_for('web.index'))
else:
@@ -205,6 +205,7 @@ def unlink_oauth(provider):
flash(_("Not Linked to %(oauth)s", oauth=provider), category="error")
return redirect(url_for('web.profile'))
def generate_oauth_blueprints():
if not ub.session.query(ub.OAuthProvider).count():
for provider in ("github", "google"):
@@ -291,6 +292,7 @@ if ub.oauth_support:
return oauth_update_token(str(oauthblueprints[1]['id']), token, google_user_id)
# notify on OAuth provider error
@oauth_error.connect_via(oauthblueprints[0]['blueprint'])
def github_error(blueprint, error, error_description=None, error_uri=None):