From eb097ca297e3bfa6ec4a4feff6c7b48e043ad0fe Mon Sep 17 00:00:00 2001 From: ShubhamPalriwala Date: Tue, 5 Mar 2024 13:31:30 +0530 Subject: [PATCH] restructure logs --- lib/enrollment/service.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/enrollment/service.ts b/lib/enrollment/service.ts index e0a3188..c09f39b 100644 --- a/lib/enrollment/service.ts +++ b/lib/enrollment/service.ts @@ -32,18 +32,17 @@ export const createEnrollment = async (enrollmentData: TEnrollmentInput): Promis throw new Error("Enrollment already exists."); } - console.log("creating new enrollment"); - - const enrollment = await db.enrollment.create({ - data: enrollmentData, - }); - const user = await getUser(enrollmentData.userId); console.log("user", user); const repository = await getRepositoryById(enrollmentData.repositoryId); console.log("repository", repository); + console.log("creating new enrollment"); + const enrollment = await db.enrollment.create({ + data: enrollmentData, + }); + console.log("new enrollment created", enrollment); return enrollment;