import { NextResponse } from "next/server";

export async function POST(req: Request) {
  const { username, password } = await req.json();

  if (username === "Wdipl" && password === "Admin@123") {
    const response = NextResponse.json({ success: true });
    response.cookies.set("isAuth", "true", { httpOnly: true });
    return response;
  }

  return NextResponse.json({ success: false }, { status: 401 });
}
