import logIP from "@/app/www/media/logIP";
import { getForums } from "@/app/www/logic/forums";

export const GET = logIP(async (req) => {
  const language = req.nextUrl.searchParams.get("language");

  if (!language) {
    return Response.json(undefined, { status: 400 });
  }

  return Response.json(await getForums(language));
});
