Explorar o código

fix(settings): force a fresh update check from the manual button (#795) (#801)

fix(update): run a real update check from the settings button (#795)
Nacho hai 2 meses
pai
achega
805d2cbc30
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      app/src/pages/Settings.tsx

+ 5 - 1
app/src/pages/Settings.tsx

@@ -3568,7 +3568,11 @@ function UpdateCheckInline() {
     setBusy(true)
     setError(false)
     try {
-      const res = await fetch('/api/update/status')
+      // #795: el botón debe FORZAR un chequeo fresco contra GitHub. Leer solo
+      // /api/update/status devuelve el resultado del último check (arranque o
+      // tick de 24 h) y puede decir "up to date" con una release ya publicada.
+      let res = await fetch('/api/update/check', { method: 'POST' })
+      if (!res.ok) res = await fetch('/api/update/status')
       if (!res.ok) throw new Error('status')
       const data = (await res.json()) as NetPulseUpdateStatus
       setStatus(data)