mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-28 23:11:17 -07:00
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
18 lines
449 B
JavaScript
18 lines
449 B
JavaScript
import { asJson } from "utils/proxy/api-helpers";
|
|
import genericProxyHandler from "utils/proxy/handlers/generic";
|
|
|
|
const widget = {
|
|
api: "{url}/api/{endpoint}?token={key}&utc=true",
|
|
proxyHandler: genericProxyHandler,
|
|
mappings: {
|
|
stats: {
|
|
endpoint: "dashboard/stats/get",
|
|
validate: ["response", "status"],
|
|
params: ["node", "type"],
|
|
map: (data) => asJson(data).response?.stats,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default widget;
|