mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-11 03:12:07 +08:00
Enhancement: beszel widget compatibility with v0.9.0 (#4439)
This commit is contained in:
@@ -45,7 +45,12 @@ export default async function beszelProxyHandler(req, res) {
|
||||
|
||||
if (widget) {
|
||||
const url = new URL(formatApiCall(widgets[widget.type].api, { endpoint, ...widget }));
|
||||
const loginUrl = formatApiCall(widgets[widget.type].api, { endpoint: "admins/auth-with-password", ...widget });
|
||||
let authEndpointVersion = "authv1";
|
||||
if (widget.version === 2) authEndpointVersion = "authv2";
|
||||
const loginUrl = formatApiCall(widgets[widget.type].api, {
|
||||
endpoint: widgets[widget.type].mappings[authEndpointVersion].endpoint,
|
||||
...widget,
|
||||
});
|
||||
|
||||
let status;
|
||||
let data;
|
||||
|
||||
Reference in New Issue
Block a user