From 8a19a6fa336768d8b6712752c9d713360067ecb0 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 8 Dec 2025 08:45:20 +0000 Subject: (최겸) 구매 피드백 수정, 안전담당자, pq항목 내 첨부, 내외자 구분, 도로명주소 api 반영(운영기준) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/juso/route.ts | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 app/api/juso/route.ts (limited to 'app/api') diff --git a/app/api/juso/route.ts b/app/api/juso/route.ts new file mode 100644 index 00000000..258e51d3 --- /dev/null +++ b/app/api/juso/route.ts @@ -0,0 +1,69 @@ +"use server"; + +import { NextRequest, NextResponse } from "next/server"; + +const JUSO_URL = "https://business.juso.go.kr/addrlink/addrLinkUrl.do"; + +export async function GET() { + const confmKey = process.env.JUSO_API_KEY || ""; + const returnUrl = `${process.env.NEXT_PUBLIC_BASE_URL || ""}/api/juso`; + const resultType = "4"; + + const html = ` + + + + +
+ + + +
+ + + `; + + return new NextResponse(html, { + status: 200, + headers: { "Content-Type": "text/html; charset=utf-8" }, + }); +} + +export async function POST(req: NextRequest) { + const formData = await req.formData(); + + const zipNo = String(formData.get("zipNo") || ""); + const roadAddrPart1 = String(formData.get("roadAddrPart1") || ""); + const roadAddrPart2 = String(formData.get("roadAddrPart2") || ""); + const addrDetail = String(formData.get("addrDetail") || ""); + + const origin = process.env.NEXT_PUBLIC_BASE_URL || "*"; + + const script = ` + + `; + + return new NextResponse(script, { + status: 200, + headers: { "Content-Type": "text/html; charset=utf-8" }, + }); +} + -- cgit v1.2.3