Просмотр исходного кода

Fixed auth header for tasmota discovery

maziggy 3 месяцев назад
Родитель
Сommit
4910bce0b2
3 измененных файлов с 3 добавлено и 5 удалено
  1. 2 4
      frontend/src/api/client.ts
  2. 0 0
      static/assets/index-DLGvpmyc.js
  3. 1 1
      static/index.html

+ 2 - 4
frontend/src/api/client.ts

@@ -2805,13 +2805,11 @@ export const api = {
 
   // Tasmota Discovery (auto-detects network)
   startTasmotaScan: () =>
-    fetch(`${API_BASE}/smart-plugs/discover/scan`, { method: 'POST' })
-      .then(res => res.ok ? res.json() : res.json().then(e => { throw new Error(e.detail || `HTTP ${res.status}`); })),
+    request<TasmotaScanStatus>('/smart-plugs/discover/scan', { method: 'POST' }),
   getTasmotaScanStatus: () =>
     request<TasmotaScanStatus>('/smart-plugs/discover/status'),
   stopTasmotaScan: () =>
-    fetch(`${API_BASE}/smart-plugs/discover/stop`, { method: 'POST' })
-      .then(res => res.ok ? res.json() : res.json().then(e => { throw new Error(e.detail || `HTTP ${res.status}`); })),
+    request<TasmotaScanStatus>('/smart-plugs/discover/stop', { method: 'POST' }),
   getDiscoveredTasmotaDevices: () =>
     request<DiscoveredTasmotaDevice[]>('/smart-plugs/discover/devices'),
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/assets/index-DLGvpmyc.js


+ 1 - 1
static/index.html

@@ -23,7 +23,7 @@
 
     <!-- Splash screens for iOS -->
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
-    <script type="module" crossorigin src="/assets/index-DSQkZ1L5.js"></script>
+    <script type="module" crossorigin src="/assets/index-DLGvpmyc.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-fdAEMOwp.css">
   </head>
   <body>

Некоторые файлы не были показаны из-за большого количества измененных файлов