mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
Update flask_server.py
This commit is contained in:
@@ -28,6 +28,9 @@ import jwt
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
CORS(app) # Enable CORS for Next.js frontend
|
||||||
|
|
||||||
# Authentication configuration
|
# Authentication configuration
|
||||||
AUTH_CONFIG_DIR = Path.home() / ".config" / "proxmenux-monitor"
|
AUTH_CONFIG_DIR = Path.home() / ".config" / "proxmenux-monitor"
|
||||||
AUTH_CONFIG_FILE = AUTH_CONFIG_DIR / "auth.json"
|
AUTH_CONFIG_FILE = AUTH_CONFIG_DIR / "auth.json"
|
||||||
@@ -293,8 +296,8 @@ def auth_change_password():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return jsonify({"error": str(e)}), 500
|
return jsonify({"error": str(e)}), 500
|
||||||
|
|
||||||
app = Flask(__name__)
|
# app = Flask(__name__)
|
||||||
CORS(app) # Enable CORS for Next.js frontend
|
# CORS(app) # Enable CORS for Next.js frontend
|
||||||
|
|
||||||
def identify_gpu_type(name, vendor=None, bus=None, driver=None):
|
def identify_gpu_type(name, vendor=None, bus=None, driver=None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user