Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
780b7f9287 | |||
6750ee98e9 | |||
3d19ec2850 | |||
a3e033b7e8 |
@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "1.4.17"
|
current_version = "1.4.19"
|
||||||
commit = true
|
commit = true
|
||||||
tag = true
|
tag = true
|
||||||
tag_name = "{new_version}"
|
tag_name = "{new_version}"
|
||||||
|
2
app.py
2
app.py
@ -560,7 +560,7 @@ def _update_npm_config(credentials=None):
|
|||||||
credentials = session.get("auth_credentials")
|
credentials = session.get("auth_credentials")
|
||||||
# If credentials are provided, we skip the session check as the user has already been authenticated
|
# If credentials are provided, we skip the session check as the user has already been authenticated
|
||||||
|
|
||||||
npm = NginxProxyManager(app_config.NPM_HOST, app_config.NPM_EMAIL, app_config.NPM_PASSWORD)
|
npm = NginxProxyManager(app.config['NPM_HOST'], app.config['NPM_EMAIL'], app.config['NPM_PASSWORD'])
|
||||||
npm.login()
|
npm.login()
|
||||||
host = npm.get_proxy_host(9)
|
host = npm.get_proxy_host(9)
|
||||||
if host:
|
if host:
|
||||||
|
@ -2,6 +2,7 @@ import requests
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List, Dict, Any, Optional
|
from typing import List, Dict, Any, Optional
|
||||||
|
import time
|
||||||
|
|
||||||
# Create a session object to reuse TCP connections
|
# Create a session object to reuse TCP connections
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
@ -40,13 +41,16 @@ def _make_api_request(
|
|||||||
|
|
||||||
def get_urls(base_url: str, auth: str) -> List[Dict[str, Any]]:
|
def get_urls(base_url: str, auth: str) -> List[Dict[str, Any]]:
|
||||||
"""Retrieves user account streams from the API."""
|
"""Retrieves user account streams from the API."""
|
||||||
response = _make_api_request("GET", base_url, auth, "getUserAccounts/streams")
|
endpoint = f"getUserAccounts/streams?_t={int(time.time())}"
|
||||||
|
response = _make_api_request("GET", base_url, auth, endpoint)
|
||||||
return response.json() if response else []
|
return response.json() if response else []
|
||||||
|
|
||||||
|
|
||||||
def get_user_accounts(base_url: str, auth: str) -> List[Dict[str, Any]]:
|
def get_user_accounts(base_url: str, auth: str) -> List[Dict[str, Any]]:
|
||||||
"""Retrieves user accounts from the API."""
|
"""Retrieves user accounts from the API."""
|
||||||
response = _make_api_request("GET", base_url, auth, "getUserAccounts")
|
# Add cache-busting parameter to ensure fresh data
|
||||||
|
endpoint = f"getUserAccounts?_t={int(time.time())}"
|
||||||
|
response = _make_api_request("GET", base_url, auth, endpoint)
|
||||||
if not response:
|
if not response:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user