solve mail backend 3
This commit is contained in:
parent
526d2b87a5
commit
a3510861c5
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user