260826_02_ENH: notihub 수정으로 인한 후속 조치 #28

Merged
gitadmin merged 1 commits from develop into master 2026-08-26 13:06:12 +09:00
2 changed files with 6 additions and 5 deletions

View File

@@ -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<SendSingleResponse>(`/message/${channel}/single/${prjctIdx}`, body);
return NextResponse.json(result, {status: 200});
}
if (action === "bulk") {

View File

@@ -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