[#24] changed .env to be a public js file script loaded by index.html

This commit is contained in:
Camille Moussu
2025-07-08 11:40:42 +02:00
parent 256d3a32c0
commit 4e32e351c4
7 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { cp } from "node:fs";
export async function getCalendars(userId: string, opaque_token: string) {
const response = await fetch(
`${process.env.PUBLIC_CALENDAR_BASE_URL}/dav/calendars/${userId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true`,
`${(window as any).CALENDAR_BASE_URL}/dav/calendars/${userId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true`,
{
headers: {
Accept: "application/calendar+json",
@@ -16,7 +16,7 @@ export async function getCalendars(userId: string, opaque_token: string) {
export async function getCalendar(id: string, opaque_token: string) {
const response = await fetch(
`${process.env.PUBLIC_CALENDAR_BASE_URL}/dav/calendars/${id}.json`,
`${(window as any).CALENDAR_BASE_URL}/dav/calendars/${id}.json`,
{
method: "REPORT",
headers: {