Skip to content

Commit

Permalink
Update proxy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Dec 18, 2024
1 parent d0eabf7 commit 6b77ae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/beszel/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default async function beszelProxyHandler(req, res) {
if (!token) {
[status, token] = await login(loginUrl, widget.username, widget.password, service);
if (status !== 200) {
logger.debug(`HTTP ${status} logging into npm api: ${token}`);
logger.debug(`HTTP ${status} logging into Beszel: ${token}`);
return res.status(status).send(token);
}
}
Expand All @@ -68,12 +68,12 @@ export default async function beszelProxyHandler(req, res) {
});

if (status === 403) {
logger.debug(`HTTP ${status} retrieving data from npm api, logging in and trying again.`);
logger.debug(`HTTP ${status} retrieving data from Beszel, logging in and trying again.`);
cache.del(`${tokenCacheKey}.${service}`);
[status, token] = await login(loginUrl, widget.username, widget.password, service);

if (status !== 200) {
logger.debug(`HTTP ${status} logging into npm api: ${data}`);
logger.debug(`HTTP ${status} logging into Beszel: ${data}`);
return res.status(status).send(data);
}

Expand Down

0 comments on commit 6b77ae8

Please sign in to comment.