mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-11 19:42:09 +08:00
Feature: Technitium DNS Widget (#3904)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
17
src/widgets/technitium/widget.js
Normal file
17
src/widgets/technitium/widget.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user