Compare commits

..

No commits in common. "473fecdcc77f7af82a879ad1ca346980ec20395b" and "ad42907ad966c6bce2d3e0203c57c78e9582353a" have entirely different histories.

3 changed files with 2 additions and 26 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "1.4.14"
current_version = "1.4.13"
commit = true
tag = true
tag_name = "{new_version}"

View File

@ -1 +1 @@
1.4.14
1.4.13

24
app.py
View File

@ -189,21 +189,10 @@ def login() -> Union[Response, str]:
response.raise_for_status()
response_data = response.json()
if response_data.get("auth") == "Success":
# Ensure case-sensitive username comparison
if response_data.get("username") != username:
return render_template("index.html", error="Invalid username or password. Please try again.")
session["logged_in"] = True
session["username"] = response_data.get("username", username)
session["user_id"] = response_data.get("user_id")
session["auth_credentials"] = encoded_credentials
# Check if the user has at least one account
base_url = app.config["BACKEND_URL"]
all_accounts = get_user_accounts(base_url, session["auth_credentials"])
if not all_accounts:
return render_template("index.html", error="No accounts associated with this user.")
next_url = request.args.get("next")
if next_url:
return redirect(next_url)
@ -266,11 +255,6 @@ def add_account() -> Union[Response, str]:
# Clear cache for user accounts route
cache_key = f"view/{session['username']}/accounts"
cache.delete(cache_key)
# Also clear memoized version for good measure
cache.delete_memoized(user_accounts, key_prefix=make_cache_key)
# Clear home page cache as well since it shows account stats
cache_key_home = f"view/{session['username']}/home"
cache.delete(cache_key_home)
# Run the NPM config update in a background thread
thread = threading.Thread(target=_update_npm_config_in_background)
thread.start()
@ -291,11 +275,6 @@ def delete_account() -> Response:
# Clear cache for user accounts route
cache_key = f"view/{session['username']}/accounts"
cache.delete(cache_key)
# Also clear memoized version for good measure
cache.delete_memoized(user_accounts, key_prefix=make_cache_key)
# Clear home page cache as well since it shows account stats
cache_key_home = f"view/{session['username']}/home"
cache.delete(cache_key_home)
return redirect(url_for("user_accounts"))
@app.route("/validateAccount", methods=["POST"])
@ -316,9 +295,6 @@ def validate_account() -> Tuple[Response, int]:
response_data = response.json()
if response_data.get("message") == "Account is valid and updated":
cache.delete_memoized(user_accounts, key_prefix=make_cache_key)
# Also clear regular cache for good measure
cache_key = f"view/{session['username']}/accounts"
cache.delete(cache_key)
# Run the NPM config update in a background thread
thread = threading.Thread(target=_update_npm_config_in_background)
thread.start()