mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 14:03:40 +01:00
Fix: calendar widget radarr integration API params invalid (#2470)
This commit is contained in:
parent
25767ba3c7
commit
15a12763f8
@ -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…
x
Reference in New Issue
Block a user