261029_01_ENH: 이메일·문자·알림톡 템플릿 삭제 기능 추가 및 삭제

This commit is contained in:
2026-11-02 12:07:06 +09:00
parent 07e70d1f44
commit 50a0cb1ef5
5 changed files with 150 additions and 38 deletions

View File

@@ -2,6 +2,7 @@
import {RouteContext} from "@/types/common";
import {createContactApi} from "@/lib/http-server";
import {errorToResponse} from "@kri/common/http";
import type { KkoSenderProfile } from "@/types/message";
import type { KkoTemplateDetail, KkoTemplateListResponse, Template, TemplateSummary } from "@kri/common/noti-hub";
// 외부 알림톡 템플릿 목록·상세 조회. JSON 본문을 contact-back에 그대로 전달한다.
@@ -35,6 +36,11 @@ export const GET = async (req: NextRequest, context: RouteContext) => {
const [action] = slug;
const contactApi = await createContactApi();
if (slug.length === 2 && action === "kko" && slug[1] === "profiles") {
const result = await contactApi.get<KkoSenderProfile[]>(`/message-template/kko/profiles`);
return NextResponse.json(result, { status: 200 });
}
if(slug.length === 2 && slug[1] === "attachment"){
const fileName = searchParams.get("fileName");
if (!fileName) {