Skip to content

Commit

Permalink
Fix: fix some instances of HTTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Nov 13, 2024
1 parent d87d347 commit 535be37
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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(`HTTTP ${status} logging into npm api: ${token}`);
logger.debug(`HTTP ${status} logging into npm api: ${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(`HTTTP ${status} retrieving data from npm api, logging in and trying again.`);
logger.debug(`HTTP ${status} retrieving data from npm api, logging in and trying again.`);
cache.del(`${tokenCacheKey}.${service}`);
[status, token] = await login(loginUrl, widget.username, widget.password, service);

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

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/calendar/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function calendarProxyHandler(req, res) {
if (contentType) res.setHeader("Content-Type", contentType);

if (status !== 200) {
logger.debug(`HTTTP ${status} retrieving data from integration URL ${integration.url} : ${data}`);
logger.debug(`HTTP ${status} retrieving data from integration URL ${integration.url} : ${data}`);
return res.status(status).send(data);
}

Expand Down
6 changes: 3 additions & 3 deletions src/widgets/npm/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default async function npmProxyHandler(req, res) {
if (!token) {
[status, token] = await login(loginUrl, widget.username, widget.password, service);
if (status !== 200) {
logger.debug(`HTTTP ${status} logging into npm api: ${token}`);
logger.debug(`HTTP ${status} logging into npm api: ${token}`);
return res.status(status).send(token);
}
}
Expand All @@ -70,12 +70,12 @@ export default async function npmProxyHandler(req, res) {
});

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/omada/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default async function omadaProxyHandler(req, res) {
const sitesResponseData = JSON.parse(data);

if (status !== 200 || sitesResponseData.errorCode > 0) {
logger.debug(`HTTTP ${status} getting sites list: ${sitesResponseData.msg}`);
logger.debug(`HTTP ${status} getting sites list: ${sitesResponseData.msg}`);
return res
.status(status)
.json({ error: { message: "Error getting sites list", url, data: sitesResponseData } });
Expand Down

0 comments on commit 535be37

Please sign in to comment.