261029_01_ENH: 이메일·문자·알림톡 템플릿 삭제 기능 추가 및 삭제
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user