Create reusable Synology proxy

- Migrate DiskStation and DownloadStation to use new proxy
- Move DiskStation proxy UI logic into component
This commit is contained in:
Jason Fischer committed 2023-01-29 17:04:36 -08:00
1 parent 2b3d4b388a
commit e62952c2c1
8 files changed
+241 -237

No files matched your search

+21 -1
View File
@@ -1,7 +1,27 @@
import synologyProxyHandler from "./proxy";
import synologyProxyHandler from '../../utils/proxy/handlers/synology'
const widget = {
// cgiPath and maxVersion are discovered at runtime, don't supply
api: "{url}/webapi/{cgiPath}?api={apiName}&version={maxVersion}&method={apiMethod}",
proxyHandler: synologyProxyHandler,
mappings: {
"system_storage": {
apiName: "SYNO.Core.System",
apiMethod: "info&type=\"storage\"",
endpoint: "system_storage"
},
"system_info": {
apiName: "SYNO.Core.System",
apiMethod: "info",
endpoint: "system_info"
},
"utilization": {
apiName: "SYNO.Core.System.Utilization",
apiMethod: "get",
endpoint: "utilization"
}
},
};
export default widget;