From 94f9ef3c3018693783961e15e320673b5cb86905 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 16 Oct 2022 21:01:14 -0700 Subject: [PATCH] Fix error on already logged in --- src/widgets/unifi/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/unifi/proxy.js b/src/widgets/unifi/proxy.js index dc1c437b9..95ac331e0 100644 --- a/src/widgets/unifi/proxy.js +++ b/src/widgets/unifi/proxy.js @@ -98,7 +98,7 @@ export default async function unifiProxyHandler(req, res) { } const json = JSON.parse(data.toString()); - if (!(json?.meta?.rc === "ok" || json.login_time)) { + if (!(json?.meta?.rc === "ok" || json?.login_time || json?.update_time)) { logger.error("Error logging in to Unifi: Data: %s", data); return res.status(401).end(data); }