Skip to content

Commit

Permalink
fix: Users logging in with a password can't get their mailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
beilunyang committed Jan 17, 2025
1 parent c8d060e commit 5df270a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/api/emails/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ export async function GET(request: Request) {
const { searchParams } = new URL(request.url)
const cursor = searchParams.get('cursor')

if (!session?.user?.email) {
return NextResponse.json({ emails: [], nextCursor: null, total: 0 })
}

const db = createDb()

try {
const baseConditions = and(
eq(emails.userId, session.user.id!),
eq(emails.userId, session!.user!.id!),
gt(emails.expiresAt, new Date())
)

Expand Down

0 comments on commit 5df270a

Please sign in to comment.