mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 16:30:31 +00:00
Fix: calendar widget radarr integration API params invalid (#2470)
This commit is contained in:
parent
25767ba3c7
commit
15a12763f8
1 changed files with 10 additions and 7 deletions
|
@ -52,15 +52,18 @@ export default function Component({ service }) {
|
|||
|
||||
// params for API fetch
|
||||
const params = useMemo(() => {
|
||||
if (!showDate) {
|
||||
return {};
|
||||
const constructedParams = {
|
||||
start: "",
|
||||
end: "",
|
||||
unmonitored: false,
|
||||
};
|
||||
|
||||
if (showDate) {
|
||||
constructedParams.start = showDate.minus({ months: 3 }).toFormat("yyyy-MM-dd");
|
||||
constructedParams.end = showDate.plus({ months: 3 }).toFormat("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
return {
|
||||
start: showDate.minus({ months: 3 }).toFormat("yyyy-MM-dd"),
|
||||
end: showDate.plus({ months: 3 }).toFormat("yyyy-MM-dd"),
|
||||
unmonitored: "false",
|
||||
};
|
||||
return constructedParams;
|
||||
}, [showDate]);
|
||||
|
||||
// Load active integrations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue