Fix linter errors

This commit is contained in:
Jason Fischer 2022-09-18 11:12:59 -07:00
parent d9985ddc4b
commit 5c18a202c2
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View File

@ -30,12 +30,12 @@ export default function Authentik({ service }) {
}
const yesterday = new Date(Date.now()).setHours(-24);
const loginsLast24H = loginsData.reduce((total, current) => {
return current.x_cord >= yesterday ? total + current.y_cord : total;
}, 0);
const failedLoginsLast24H = failedLoginsData.reduce((total, current) => {
return current.x_cord >= yesterday ? total + current.y_cord : total;
}, 0);
const loginsLast24H = loginsData.reduce(
(total, current) => current.x_cord >= yesterday ? total + current.y_cord : total
, 0);
const failedLoginsLast24H = failedLoginsData.reduce(
(total, current) => current.x_cord >= yesterday ? total + current.y_cord : total
, 0);
return (
<Widget>

View File

@ -20,7 +20,7 @@ export default async function credentialedProxyHandler(req, res) {
} else if (widget.type === "gotify") {
headers["X-gotify-Key"] = `${widget.key}`;
} else if (widget.type === "authentik") {
headers["Authorization"] = `Bearer ${widget.key}`;
headers.Authorization = `Bearer ${widget.key}`;
} else {
headers["X-API-Key"] = `${widget.key}`;
}