solve mail backend 3

This commit is contained in:
alma 2025-04-17 13:53:15 +02:00
parent 526d2b87a5
commit a3510861c5

View File

@ -14,6 +14,18 @@ export async function POST(request: Request) {
);
}
// Verify user exists
const user = await prisma.user.findUnique({
where: { id: session.user.id }
});
if (!user) {
return NextResponse.json(
{ error: 'User not found' },
{ status: 404 }
);
}
const { email, password, host, port } = await request.json();
if (!email || !password || !host || !port) {