260115_02_ENH : 로그인 오류 수정 및 템플릿 생성 연동 완료

This commit is contained in:
2026-01-15 11:36:01 +09:00
parent 7e7b494389
commit 431513c195
34 changed files with 823 additions and 103 deletions

View File

@@ -0,0 +1,23 @@
import {NextRequest, NextResponse} from "next/server";
import {RouteContext} from "@/types/common";
import {createContactApi} from "@/lib/server-api";
import {ProjectInfo, ProjectOwnerResponse, ResultCode} from "@/types/project";
import {errorToResponse} from "@/lib/http-util";
export const GET = async (req: NextRequest, context: RouteContext) => {
try {
const { searchParams } = new URL(req.url);
const {slug = []} = await context.params;
const [action] = slug;
const contactApi = await createContactApi();
if(slug.length === 1){
const result = await contactApi.get<ResultCode[]>(`/result-code/${slug[0]}`);
return NextResponse.json(result, { status: 200 });
}
return NextResponse.json({ message: "Not found" }, { status: 404 });
} catch (error: unknown) {
return errorToResponse(error);
}
};