From d2c6a55b8aad81eac8557be0707e2c2d59a98671 Mon Sep 17 00:00:00 2001 From: Dhirajsingh212 Date: Thu, 10 Oct 2024 09:27:50 +0530 Subject: [PATCH] fix:unapproved jobs in explore jobs page --- src/actions/job.action.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/job.action.ts b/src/actions/job.action.ts index 95e505a2..b03973cc 100644 --- a/src/actions/job.action.ts +++ b/src/actions/job.action.ts @@ -106,7 +106,7 @@ export const getAllJobs = withServerActionAsyncCatcher< } const result = JobQuerySchema.parse(data); const { filterQueries, orderBy, pagination } = getJobFilters(result); - const queryJobsPromise = prisma.job.findMany({ + const queryJobsPromise = await prisma.job.findMany({ ...pagination, orderBy: [orderBy], where: { @@ -134,7 +134,7 @@ export const getAllJobs = withServerActionAsyncCatcher< companyLogo: true, }, }); - const totalJobsPromise = prisma.job.count({ + const totalJobsPromise = await prisma.job.count({ where: { isVerifiedJob: true, ...filterQueries,