mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-07 07:43:39 +01:00
18 lines
440 B
JavaScript
18 lines
440 B
JavaScript
![]() |
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||
|
import { asJson } from "utils/proxy/api-helpers";
|
||
|
|
||
|
const widget = {
|
||
|
api: "{url}/api/{endpoint}?token={key}&utc=true",
|
||
|
proxyHandler: genericProxyHandler,
|
||
|
mappings: {
|
||
|
stats: {
|
||
|
endpoint: "dashboard/stats/get",
|
||
|
validate: ["response", "status"],
|
||
|
params: ["type"],
|
||
|
map: (data) => asJson(data).response.stats,
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
|
||
|
export default widget;
|