Fix error on already logged in

pull/398/head
Michael Shamoon 2 years ago
parent 3d89d7ad1b
commit 94f9ef3c30

@ -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);
}

Loading…
Cancel
Save