fix: changing strict equals to just equals to allow string value in widget.version

This commit is contained in:
Rogerio Peixoto 2024-12-24 20:45:54 +01:00 committed by GitHub
parent 1c6480586c
commit 96feb94194
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,7 @@ export default async function beszelProxyHandler(req, res) {
if (widget) {
const url = new URL(formatApiCall(widgets[widget.type].api, { endpoint, ...widget }));
let authEndpointVersion = "authv1";
if (widget.version === 2) authEndpointVersion = "authv2";
if (widget.version == 2) authEndpointVersion = "authv2";
const loginUrl = formatApiCall(widgets[widget.type].api, {
endpoint: widgets[widget.type].mappings[authEndpointVersion].endpoint,
...widget,