debug: remove console log and use process.env for env retrieval
All checks were successful
Build & Deploy (prod) / deploy (push) Successful in 33s
All checks were successful
Build & Deploy (prod) / deploy (push) Successful in 33s
This commit is contained in:
20
package-lock.json
generated
20
package-lock.json
generated
@@ -22,6 +22,9 @@
|
|||||||
"tailwind-variants": "^3.2.2",
|
"tailwind-variants": "^3.2.2",
|
||||||
"tailwindcss": "^4.1.18",
|
"tailwindcss": "^4.1.18",
|
||||||
"tw-animate-css": "^1.4.0"
|
"tw-animate-css": "^1.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@astrojs/compiler": {
|
"node_modules/@astrojs/compiler": {
|
||||||
@@ -1887,6 +1890,16 @@
|
|||||||
"@types/unist": "*"
|
"@types/unist": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "25.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
||||||
|
"integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.19.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/unist": {
|
"node_modules/@types/unist": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||||
@@ -5475,6 +5488,13 @@
|
|||||||
"integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
|
"integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.19.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz",
|
||||||
|
"integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/unified": {
|
"node_modules/unified": {
|
||||||
"version": "11.0.5",
|
"version": "11.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
|
||||||
|
|||||||
@@ -24,5 +24,8 @@
|
|||||||
"tailwind-variants": "^3.2.2",
|
"tailwind-variants": "^3.2.2",
|
||||||
"tailwindcss": "^4.1.18",
|
"tailwindcss": "^4.1.18",
|
||||||
"tw-animate-css": "^1.4.0"
|
"tw-animate-css": "^1.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,14 +152,11 @@ export const POST: APIRoute = async ({ request, clientAddress }) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const resendApiKey = import.meta.env.RESEND_API_KEY as string | undefined;
|
const resendApiKey = process.env.RESEND_API_KEY;
|
||||||
const contactToEmail = import.meta.env.CONTACT_TO_EMAIL as string | undefined;
|
const contactToEmail = process.env.CONTACT_TO_EMAIL;
|
||||||
const contactFromEmail = import.meta.env.CONTACT_FROM_EMAIL as
|
const contactFromEmail = process.env.CONTACT_FROM_EMAIL;
|
||||||
| string
|
|
||||||
| undefined;
|
|
||||||
|
|
||||||
if (!resendApiKey || !contactToEmail || !contactFromEmail) {
|
if (!resendApiKey || !contactToEmail || !contactFromEmail) {
|
||||||
console.log(resendApiKey, contactToEmail, contactFromEmail);
|
|
||||||
return respondJson(501, {
|
return respondJson(501, {
|
||||||
ok: false,
|
ok: false,
|
||||||
error: {
|
error: {
|
||||||
@@ -199,7 +196,6 @@ export const POST: APIRoute = async ({ request, clientAddress }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
console.log(await response.json());
|
|
||||||
return respondJson(502, {
|
return respondJson(502, {
|
||||||
ok: false,
|
ok: false,
|
||||||
error: {
|
error: {
|
||||||
|
|||||||
Reference in New Issue
Block a user