260826_02_ENH: notihub 수정으로 인한 후속 조치
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user