Skip to content

Commit

Permalink
Fix: calendar widget radarr integration API params invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Dec 11, 2023
1 parent bd6f24d commit 5f928eb
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 {};
let params = {
start: "",
end: "",
unmonitored: false,
};

if (showDate) {
params.start = showDate.minus({ months: 3 }).toFormat("yyyy-MM-dd");
params.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 params;
}, [showDate]);

// Load active integrations
Expand Down

0 comments on commit 5f928eb

Please sign in to comment.