summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/email-template/service.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/email-template/service.ts b/lib/email-template/service.ts
index c492410a..7c92b377 100644
--- a/lib/email-template/service.ts
+++ b/lib/email-template/service.ts
@@ -1,7 +1,7 @@
'use server';
import db from '@/db/db';
-import { eq, and, desc, sql, count, ilike, asc, or } from 'drizzle-orm';
+import { eq, and, desc, sql, count, ilike, asc, or, SQL } from 'drizzle-orm';
import handlebars from 'handlebars';
import i18next from 'i18next';
import resourcesToBackend from 'i18next-resources-to-backend';
@@ -255,7 +255,9 @@ export async function getTemplateList(input: GetEmailTemplateSchema) {
}
}
- const conditions = [];
+ const conditions: SQL[] = [];
+ conditions.push(eq(templateListView.isActive, true));
+
if (advancedWhere) conditions.push(advancedWhere);
if (globalWhere) conditions.push(globalWhere);
@@ -265,7 +267,7 @@ export async function getTemplateList(input: GetEmailTemplateSchema) {
}
// 아니면 ilike, inArray, gte 등으로 where 절 구성
- const where = finalWhere
+ const where = finalWhere;
// 정렬 조건 구성
let orderBy;