Selaa lähdekoodia

Merge branch 'widget/homebridge' of https://github.com/Fernando-Neira/homepage into pr/442

Michael Shamoon 2 vuotta sitten
vanhempi
commit
df3e2eff11
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/widgets/homebridge/proxy.js

+ 3 - 1
src/widgets/homebridge/proxy.js

@@ -93,7 +93,9 @@ export default async function homebridgeProxyHandler(req, res) {
     return res.status(400).json({ error: "Invalid proxy service type" });
   }
 
-  await login(widget);
+  if (!cache.get(sessionTokenCacheKey)) {
+    await login(widget);
+  }
 
   const statusRs = await apiCall(widget, "status/homebridge");
   const versionRs = await apiCall(widget, "status/homebridge-version");