mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 16:30:31 +00:00
Create reusable Synology proxy
- Migrate DiskStation and DownloadStation to use new proxy - Move DiskStation proxy UI logic into component
This commit is contained in:
parent
2b3d4b388a
commit
e62952c2c1
8 changed files with 241 additions and 237 deletions
|
@ -1,12 +1,15 @@
|
|||
import downloadstationProxyHandler from "./proxy";
|
||||
import synologyProxyHandler from '../../utils/proxy/handlers/synology'
|
||||
|
||||
const widget = {
|
||||
api: "{url}/webapi/DownloadStation/task.cgi?api=SYNO.DownloadStation.Task&version=1&method={endpoint}",
|
||||
proxyHandler: downloadstationProxyHandler,
|
||||
// cgiPath and maxVersion are discovered at runtime, don't supply
|
||||
api: "{url}/webapi/{cgiPath}?api={apiName}&version={maxVersion}&method={apiMethod}",
|
||||
proxyHandler: synologyProxyHandler,
|
||||
|
||||
mappings: {
|
||||
"list": {
|
||||
endpoint: "list&additional=transfer",
|
||||
apiName: "SYNO.DownloadStation.Task",
|
||||
apiMethod: "list&additional=transfer",
|
||||
endpoint: "list"
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue