Fix: calendar widget radarr integration API params invalid (#2470)

pull/2474/head
shamoon 5 months ago committed by GitHub
parent 25767ba3c7
commit 15a12763f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save