Add local test data, implement [id].tsx for approval workflows

This commit is contained in:
Joao Correia
2025-01-17 18:44:52 +00:00
parent 580e319fb9
commit 66d23b4140
5 changed files with 175 additions and 16 deletions

View File

@@ -0,0 +1,8 @@
import { ApprovalWorkflow } from "@/interfaces/approval.workflow";
import client from "@/lib/mongodb";
const db = client.db(process.env.MONGODB_DB);
export const getApprovalWorkflow = async (id: string) => {
return await db.collection("approval-workflows").findOne<ApprovalWorkflow>({ id });
};