diff --git a/src/app/api/comm-code/route.ts b/src/app/api/comm-code/route.ts index d91adf6..0a99b9c 100644 --- a/src/app/api/comm-code/route.ts +++ b/src/app/api/comm-code/route.ts @@ -26,6 +26,10 @@ async function getCommCode(request: NextRequest): Promise { const results: CommCode[] = await prisma.BC_COMM_L.findMany({ where: { HEAD_CD: commHeadData.HEAD_CD, + // 'Y'가 아닌 모든 값 포함 (삭제 표시가 없는 모든 경우) + DEL_YN: { + notIn: ['Y'] + }, }, select: { HEAD_CD: true, @@ -34,6 +38,7 @@ async function getCommCode(request: NextRequest): Promise { REF_CHR1: true, REF_NUM1: true, }, + orderBy: { CODE: 'asc', },