From b5540a9958f4e2baf83c3a48318c4c50acdaa59d Mon Sep 17 00:00:00 2001 From: Aimsucks Date: Tue, 14 Jun 2022 17:01:30 +0000 Subject: [PATCH] :bug: Origin URL in calendar to includes path Changed the origin variable in the calendar module to use the entire URL instead of just the origin domain --- src/pages/api/modules/calendar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}`