Skip to content

Commit 982ae09

Browse files
committed
directory for edge functions
1 parent e0a4335 commit 982ae09

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[build]
2-
edge_functions = "my-custom-directory"
2+
edge_functions = "edge-functions"

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"lint": "eslint ./src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
1717
"lint-fix": "npm run lint -- --fix",
1818
"get-mock-events": "node ./scripts/setMock.js",
19-
"decrypt-service-account": "gpg --quiet --batch --yes --decrypt --passphrase=${GOOGLE_SERVICE_ACCOUNT_PASSPHRASE} --output $INIT_CWD/calendar-service-account.json calendar-service-account.json.gpg",
19+
"decrypt-service-account": "gpg --quiet --batch --yes --decrypt --passphrase=${GOOGLE_SERVICE_ACCOUNT_PASSPHRASE} --output calendar-service-account.json calendar-service-account.json.gpg",
2020
"download-ics": "npx mkdirp dist && curl -o dist/basic.ics https://calendar.google.com/calendar/ical/finos.org_fac8mo1rfc6ehscg0d80fi8jig%40group.calendar.google.com/public/basic.ics",
21-
"setup-env": "npx mkdirp /var/task && cp calendar-service-account.json /var/task/calendar-service-account.json",
21+
"setup-env": "npx mkdirp /opt/build/repo/edge-functions && cp calendar-service-account.json /opt/build/repo/edge-functions/calendar-service-account.json",
2222
"get-events": "npx mkdirp dist && node ./scripts/googleapi2events.mjs",
2323
"getEvents": "npm run get-events",
2424
"test": "vitest"

src/api/signup-submit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default async function handler(req, res) {
99
const eventId = req.body.eventId;
1010

1111
// Replace with the path to your service account JSON file
12-
const SERVICE_ACCOUNT_FILE = './calendar-service-account.json'
12+
const SERVICE_ACCOUNT_FILE = '/opt/build/repo/edge-functions/calendar-service-account.json'
1313

1414
// Scopes required for the Google Calendar API
1515
const SCOPES = [

0 commit comments

Comments
 (0)