mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
widget refactoring and cleanup
This commit is contained in:
parent
808e79e2ac
commit
47bc073fb4
39 changed files with 92 additions and 1410 deletions
|
@ -1,25 +1,5 @@
|
|||
// const formats = {
|
||||
// emby: `{url}/emby/{endpoint}?api_key={key}`,
|
||||
// jellyfin: `{url}/emby/{endpoint}?api_key={key}`,
|
||||
// pihole: `{url}/admin/{endpoint}`,
|
||||
// speedtest: `{url}/api/{endpoint}`,
|
||||
// tautulli: `{url}/api/v2?apikey={key}&cmd={endpoint}`,
|
||||
// traefik: `{url}/api/{endpoint}`,
|
||||
// portainer: `{url}/api/endpoints/{env}/{endpoint}`,
|
||||
// rutorrent: `{url}/plugins/httprpc/action.php`,
|
||||
// transmission: `{url}/transmission/rpc`,
|
||||
// qbittorrent: `{url}/api/v2/{endpoint}`,
|
||||
// jellyseerr: `{url}/api/v1/{endpoint}`,
|
||||
// ombi: `{url}/api/v1/{endpoint}`,
|
||||
// npm: `{url}/api/{endpoint}`,
|
||||
// lidarr: `{url}/api/v1/{endpoint}?apikey={key}`,
|
||||
// readarr: `{url}/api/v1/{endpoint}?apikey={key}`,
|
||||
// sabnzbd: `{url}/api/?apikey={key}&output=json&mode={endpoint}`,
|
||||
// gotify: `{url}/{endpoint}`,
|
||||
// prowlarr: `{url}/api/v1/{endpoint}`,
|
||||
// jackett: `{url}/api/v2.0/{endpoint}?apikey={key}&configured=true`,
|
||||
// strelaysrv: `{url}/{endpoint}`,
|
||||
// mastodon: `{url}/api/v1/{endpoint}`,
|
||||
// };
|
||||
|
||||
export function formatApiCall(url, args) {
|
||||
|
@ -45,7 +25,7 @@ function getURLSearchParams(widget, endpoint) {
|
|||
export function formatProxyUrlWithSegments(widget, endpoint, segments) {
|
||||
const params = getURLSearchParams(widget, endpoint);
|
||||
if (segments) {
|
||||
params.append("segments", JSON.stringify(segments))
|
||||
params.append("segments", JSON.stringify(segments));
|
||||
}
|
||||
return `/api/services/proxy?${params.toString()}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue