kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
at main 25 lines 842 B view raw
1import { eq } from "drizzle-orm"; 2import db from "../../database"; 3import { columnTable, workflowRuleTable } from "../../database/schema"; 4 5async function getWorkflowRules(projectId: string) { 6 const rules = await db 7 .select({ 8 id: workflowRuleTable.id, 9 projectId: workflowRuleTable.projectId, 10 integrationType: workflowRuleTable.integrationType, 11 eventType: workflowRuleTable.eventType, 12 columnId: workflowRuleTable.columnId, 13 columnName: columnTable.name, 14 columnSlug: columnTable.slug, 15 createdAt: workflowRuleTable.createdAt, 16 updatedAt: workflowRuleTable.updatedAt, 17 }) 18 .from(workflowRuleTable) 19 .leftJoin(columnTable, eq(workflowRuleTable.columnId, columnTable.id)) 20 .where(eq(workflowRuleTable.projectId, projectId)); 21 22 return rules; 23} 24 25export default getWorkflowRules;