From c3246178790b4cb3ea580d42bf99c6352e7efa57 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Wed, 26 Aug 2026 13:03:56 +0900 Subject: [PATCH] =?UTF-8?q?260826=5F02=5FENH:=20notihub=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=ED=9B=84?= =?UTF-8?q?=EC=86=8D=20=EC=A1=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/message/[[...slug]]/route.ts | 6 +++--- src/components/dialog/SingleMessageSendDialog.tsx | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/api/message/[[...slug]]/route.ts b/src/app/api/message/[[...slug]]/route.ts index 0f8d187..d24ac93 100644 --- a/src/app/api/message/[[...slug]]/route.ts +++ b/src/app/api/message/[[...slug]]/route.ts @@ -2,7 +2,7 @@ import {NextRequest, NextResponse} from "next/server"; import {RouteContext} from "@/types/common"; import {createContactApi} from "@/lib/http-server"; import {errorToResponse} from "@kri/common/http"; -import type {MessageBulkSendResponse} from "@/types/message"; +import type {MessageBulkSendResponse, SendSingleResponse} from "@/types/message"; const isChannel = (value: string): value is "sms" | "email" => value === "sms" || value === "email"; @@ -22,8 +22,8 @@ export const POST = async (req: NextRequest, context: RouteContext) => { } if (action === "single") { - await contactApi.post(`/message/${channel}/single/${prjctIdx}`, body); - return new NextResponse(null, {status: 204}); + const result = await contactApi.post(`/message/${channel}/single/${prjctIdx}`, body); + return NextResponse.json(result, {status: 200}); } if (action === "bulk") { diff --git a/src/components/dialog/SingleMessageSendDialog.tsx b/src/components/dialog/SingleMessageSendDialog.tsx index 1274c53..436d398 100644 --- a/src/components/dialog/SingleMessageSendDialog.tsx +++ b/src/components/dialog/SingleMessageSendDialog.tsx @@ -144,8 +144,9 @@ const SingleMessageSendDialog = ({ }) // cmid는 발송 CMID이며 verificationId와는 다른 식별자이므로 혼용하지 않는다. - const cmid = res.cmid - if (isPhoneVerificationTemplate) { + // 서버 응답 바디가 비어 있는 경우(res가 null)를 대비해 안전하게 접근한다. + const cmid = res?.cmid + if (isPhoneVerificationTemplate && res?.data) { // 휴대전화번호 인증 응답. verificationId/expireDt는 이후 인증 단계에서 사용할 값이나, // 이 시스템에서는 인증번호 확인 절차를 사용하지 않으므로 현재는 별도로 활용하지 않는다. const { verificationId, expireDt } = res.data as PhoneVerificationSendData -- 2.49.0.windows.1