Release v5.3.1: Hotfix API server update e prevenzione SyntaxError JSON

This commit is contained in:
2026-11-03 16:56:34 +01:00
parent 3064dc035f
commit 5fabe68944
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -371,7 +371,7 @@ def background_gitea_check():
except Exception as e: except Exception as e:
logger.error(f"Errore controllo Gitea in background: {e}") logger.error(f"Errore controllo Gitea in background: {e}")
@api_bp.route('/api/server_update/status', methods=['GET']) @api_bp.route('/api/server_update/check', methods=['GET'])
def get_server_update_status(): def get_server_update_status():
global LAST_GITEA_CHECK_TIME global LAST_GITEA_CHECK_TIME
auth = get_auth() auth = get_auth()
+1 -1
View File
@@ -1372,7 +1372,7 @@ function urlB64ToUint8Array(base64String) { const padding = '='.repeat((4 - base
async function checkServerUpdate() { async function checkServerUpdate() {
if (!isAuthenticated || me.role !== 'admin') return; if (!isAuthenticated || me.role !== 'admin') return;
try { const res = await fetch('/api/server_update/check'); const data = await res.json(); const btn = document.getElementById('server-update-btn'); if (btn) { btn.style.display = data.update_available ? 'inline-block' : 'none'; } } catch (e) { console.error(e); } try { const res = await fetch('/api/server_update/check'); if (!res.ok) return; const data = await res.json(); const btn = document.getElementById('server-update-btn'); if (btn) { btn.style.display = data.update_available ? 'inline-block' : 'none'; } } catch (e) { console.error(e); }
} }
function confirmServerUpdate() { function confirmServerUpdate() {