Skip to content

Commit 924a6dd

Browse files
committed
fix: lint and prettier
1 parent 4290663 commit 924a6dd

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# openresume
1+
# OpenResume

src/lib/prisma.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import { PrismaClient } from '@prisma/client'
1+
import { PrismaClient } from "@prisma/client";
22

33
// Prevent multiple Prisma Client instances in development
4-
const globalForPrisma = global as unknown as { prisma: PrismaClient }
4+
const globalForPrisma = global as unknown as { prisma: PrismaClient };
55

66
export const prisma =
77
globalForPrisma.prisma ||
88
new PrismaClient({
9-
log:
10-
process.env.NODE_ENV === 'development'
11-
? ['query', 'error', 'warn']
12-
: ['error']
13-
})
9+
log: process.env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"],
10+
});
1411

15-
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
12+
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

src/util/email.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ export const normalizeEmail = (email: string) => {
2323
export const findUserByNormalizedEmail = async (email: string) => {
2424
const normalizedEmail = normalizeEmail(email);
2525

26-
console.log({ normalizedEmail });
26+
const splitEmail = email.split("@");
27+
const domain = splitEmail[1];
2728

28-
// Get all users with the same domain
29-
const [localPart, domain] = email.split("@");
3029
const usersWithSameDomain = await prisma.user.findMany({
3130
where: { email: { endsWith: `@${domain}` } }, // Fetch users with the same domain
3231
});
@@ -39,7 +38,5 @@ export const findUserByNormalizedEmail = async (email: string) => {
3938
return normalizedDbEmail === normalizedEmail;
4039
});
4140

42-
console.log({ matchedUser });
43-
4441
return matchedUser;
4542
};

0 commit comments

Comments
 (0)