Newer
Older
taehui / taehui-fe / src / app / www / forums / route.ts
@Taehui Taehui on 17 Mar 333 bytes 2024-03-18 오전 12:51
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));
});