Update default API settings

- Set default API access token to gtW82Ejr8LySk2PFVRefn-HEWG5NrowsHaDCht2yPGo
- Change default FastAPI server URL to https://mbetter.nexlab.net/
- Update default request interval to 600 seconds (10 minutes)
- Update settings across config template, routes, and settings.py
parent d7f28dfb
......@@ -241,11 +241,11 @@ class ApiConfig:
"""REST API client configuration"""
base_url: str = ""
token: str = ""
fastapi_url: str = "https://mbetter.nexlab.net/api/updates"
api_token: str = ""
fastapi_url: str = "https://mbetter.nexlab.net/"
api_token: str = "gtW82Ejr8LySk2PFVRefn-HEWG5NrowsHaDCht2yPGo"
api_timeout: int = 30
api_enabled: bool = True
api_interval: int = 1800 # Default 30 minutes in seconds
api_interval: int = 600 # Default 10 minutes in seconds
timeout_seconds: int = 30
retry_attempts: int = 3
retry_delay_seconds: int = 5
......
......@@ -287,9 +287,9 @@ def configuration():
'db_path': database_config.get('db_path', 'data/mbetterclient.db'),
# API settings
'fastapi_url': api_config.get('fastapi_url', 'https://mbetter.nexlab.net/api/updates'),
'api_token': api_config.get('api_token', ''),
'api_interval': api_config.get('api_interval', 1800),
'fastapi_url': api_config.get('fastapi_url', 'https://mbetter.nexlab.net/'),
'api_token': api_config.get('api_token', 'gtW82Ejr8LySk2PFVRefn-HEWG5NrowsHaDCht2yPGo'),
'api_interval': api_config.get('api_interval', 600),
'api_timeout': api_config.get('api_timeout', 30),
'api_enabled': api_config.get('api_enabled', True),
......@@ -328,9 +328,9 @@ def configuration():
'video_height': 1080,
'fullscreen': False,
'db_path': 'data/mbetterclient.db',
'fastapi_url': 'https://mbetter.nexlab.net/api/updates',
'api_token': '',
'api_interval': 1800,
'fastapi_url': 'https://mbetter.nexlab.net/',
'api_token': 'gtW82Ejr8LySk2PFVRefn-HEWG5NrowsHaDCht2yPGo',
'api_interval': 600,
'api_timeout': 30,
'api_enabled': True,
'screen_cast_enabled': True,
......@@ -2312,7 +2312,7 @@ def get_api_client_status():
status_data["api_config"] = {
"fastapi_url": api_config.get("fastapi_url", ""),
"api_token_set": bool(api_config.get("api_token", "").strip()),
"api_interval": api_config.get("api_interval", 1800),
"api_interval": api_config.get("api_interval", 600),
"api_enabled": api_config.get("api_enabled", True)
}
except Exception as e:
......
......@@ -76,21 +76,21 @@
<div class="mb-3">
<label for="fastapi-url" class="form-label">FastAPI Server URL</label>
<input type="url" class="form-control" id="fastapi-url"
value="{{ config.fastapi_url or 'https://mbetter.nexlab.net/api/updates' }}"
placeholder="https://mbetter.nexlab.net/api/updates">
value="{{ config.fastapi_url or 'https://mbetter.nexlab.net/' }}"
placeholder="https://mbetter.nexlab.net/">
<div class="form-text">Base URL for FastAPI server requests (include https:// or http://)</div>
</div>
<div class="mb-3">
<label for="api-token" class="form-label">API Access Token</label>
<input type="password" class="form-control" id="api-token"
value="{{ config.api_token or '' }}"
value="{{ config.api_token or 'gtW82Ejr8LySk2PFVRefn-HEWG5NrowsHaDCht2yPGo' }}"
placeholder="Enter your API access token">
<div class="form-text">Authentication token for FastAPI server access</div>
</div>
<div class="mb-3">
<label for="api-interval" class="form-label">Request Interval (seconds)</label>
<input type="number" class="form-control" id="api-interval"
value="{{ config.api_interval or 1800 }}" min="30" max="86400">
value="{{ config.api_interval or 600 }}" min="30" max="86400">
<div class="form-text">Time between automatic API requests (30 seconds to 24 hours)</div>
</div>
<div class="mb-3">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment