diff --git a/.vscode/settings.json b/.vscode/settings.json index 5beed3c..bc3ff23 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,8 +8,6 @@ "javascriptreact": "html", "typescriptreact": "html" }, -"deno.disablePaths": [ - "./.react-email" -], -"workbench.iconTheme": "vscode-icons" + "deno.disablePaths": ["./.react-email"], + "workbench.iconTheme": "vscode-icons" } diff --git a/routes/api/auth/login.ts b/routes/api/auth/login.ts index f483fb1..4b5e316 100644 --- a/routes/api/auth/login.ts +++ b/routes/api/auth/login.ts @@ -8,7 +8,7 @@ import { import { deleteCookie, setCookie } from "$std/http/cookie.ts"; import { sendEmail } from "@/utils/email/client.ts"; -const emailHTML = await Deno.readTextFile("./out/login.html"); +const emailHTML = await Deno.readTextFile(`${import.meta.url}/out/login.html`); const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;