Skip to content

Commit

Permalink
Fix: calendar widget radarr integration API params invalid (gethomepa…
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Dec 11, 2023
1 parent 25767ba commit 15a1276
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/widgets/calendar/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15a1276

Please sign in to comment.