diff --git a/src/pages/api/modules/calendar.ts b/src/pages/api/modules/calendar.ts index 7c48008b5..70d2c2f4c 100644 --- a/src/pages/api/modules/calendar.ts +++ b/src/pages/api/modules/calendar.ts @@ -44,7 +44,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) { }); } // Get the origin URL - const { origin } = new URL(service.url); + const { href: origin } = new URL(service.url); const pined = `${origin}${url?.url}?apiKey=${service.apiKey}&end=${nextMonth}&start=${lastMonth}`; const data = await axios.get( `${origin}${url?.url}?apiKey=${service.apiKey}&end=${nextMonth}&start=${lastMonth}`