🐛 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
This commit is contained in:
Aimsucks committed 2022-06-14 17:01:30 +00:00
1 parent 778988de58
commit b5540a9958
1 file changed
+1 -1
+1 -1
View File
@@ -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}`