From 48a2255bfc45ffcfb0b39ffefdd57cbacf8b36df Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 18 Jul 2025 07:52:02 +0000 Subject: (대표님) 파일관리변경, 클라IP추적, 실시간알림, 미들웨어변경, 알림API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tags/form-mapping-service.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lib/tags') diff --git a/lib/tags/form-mapping-service.ts b/lib/tags/form-mapping-service.ts index 3e86e9d9..6de0e244 100644 --- a/lib/tags/form-mapping-service.ts +++ b/lib/tags/form-mapping-service.ts @@ -69,5 +69,33 @@ export async function getFormMappingsByTagType( // 3) 아무것도 없으면 빈 배열 console.log(`No mappings found at all for tagType="${tagType}"`); + return []; +} + + +export async function getFormMappingsByTagTypebyProeject( + + projectId: number, +): Promise { + + const specificRows = await db + .select({ + formCode: tagTypeClassFormMappings.formCode, + formName: tagTypeClassFormMappings.formName, + ep: tagTypeClassFormMappings.ep, + remark: tagTypeClassFormMappings.remark + }) + .from(tagTypeClassFormMappings) + .where(and( + eq(tagTypeClassFormMappings.projectId, projectId), + )) + + if (specificRows.length > 0) { + console.log("Found specific mapping rows:", specificRows.length); + return specificRows; + } + + + return []; } \ No newline at end of file -- cgit v1.2.3