feat: ContactUs Nodemailer

This commit is contained in:
Dex404 2024-04-22 05:29:01 +00:00
parent c9ff0b9e08
commit f6b9e7afe7
2 changed files with 24 additions and 24 deletions

View file

@ -1,10 +1,10 @@
import { prisma } from "./prisma" // import { prisma } from "./prisma"
export async function getUserByEmail(email: string) { // export async function getUserByEmail(email: string) {
try { // try {
const user = await prisma.user.findUnique({ where: { email } }) // const user = await prisma.user.findUnique({ where: { email } })
return user // return user
} catch { // } catch {
return null // return null
} // }
} // }

View file

@ -1,20 +1,20 @@
// This is your Prisma schema file, // This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema // learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client { // generator client {
provider = "prisma-client-js" // provider = "prisma-client-js"
} // }
datasource db { // datasource db {
provider = "sqlite" // provider = "sqlite"
url = env("DATABASE_URL") // url = env("DATABASE_URL")
} // }
model User { // model User {
id String @id @default(cuid()) // id String @id @default(cuid())
name String? // name String?
email String? @unique // email String? @unique
emailVerified DateTime? // emailVerified DateTime?
image String? // image String?
password String? // password String?
} // }