mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix error on already logged in
This commit is contained in:
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…
x
Reference in New Issue
Block a user