From 5c18a202c2d97de179b5fdf381b0792315a8c3ba Mon Sep 17 00:00:00 2001 From: Jason Fischer Date: Sun, 18 Sep 2022 11:12:59 -0700 Subject: [PATCH] Fix linter errors --- .../services/widgets/service/authentik.jsx | 12 ++++++------ src/utils/proxies/credentialed.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/services/widgets/service/authentik.jsx b/src/components/services/widgets/service/authentik.jsx index 138f2d7f..9856f0cf 100644 --- a/src/components/services/widgets/service/authentik.jsx +++ b/src/components/services/widgets/service/authentik.jsx @@ -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 ( diff --git a/src/utils/proxies/credentialed.js b/src/utils/proxies/credentialed.js index 04a19c06..41f15068 100644 --- a/src/utils/proxies/credentialed.js +++ b/src/utils/proxies/credentialed.js @@ -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}`; }