mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-06 04:08:47 +00:00
24 lines
503 B
JavaScript
24 lines
503 B
JavaScript
import { asJson } from "utils/proxy/api-helpers";
|
|
import genericProxyHandler from "utils/proxy/handlers/generic";
|
|
|
|
const widget = {
|
|
api: "{url}/api/{endpoint}/wanted?apikey={key}",
|
|
proxyHandler: genericProxyHandler,
|
|
|
|
mappings: {
|
|
movies: {
|
|
endpoint: "movies",
|
|
map: (data) => ({
|
|
total: asJson(data).total,
|
|
}),
|
|
},
|
|
episodes: {
|
|
endpoint: "episodes",
|
|
map: (data) => ({
|
|
total: asJson(data).total,
|
|
}),
|
|
},
|
|
},
|
|
};
|
|
|
|
export default widget;
|