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

This commit is contained in:
2026-08-26 13:03:56 +09:00
parent a603f6ad6f
commit c324617879
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") {