From f98d24d2186154b5df017905bfe785a8e69ebf90 Mon Sep 17 00:00:00 2001 From: Yazeed Loonat Date: Wed, 28 Feb 2024 12:53:14 -0700 Subject: [PATCH] fix: update per morgan --- api/src/services/application.service.ts | 3 +++ api/test/unit/services/application.service.spec.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/api/src/services/application.service.ts b/api/src/services/application.service.ts index 264415090a..6e6cfbe481 100644 --- a/api/src/services/application.service.ts +++ b/api/src/services/application.service.ts @@ -128,6 +128,9 @@ export class ApplicationService { params: MostRecentApplicationQueryParams, ): Promise { const rawApplication = await this.prisma.applications.findFirst({ + select: { + id: true, + }, orderBy: { createdAt: 'desc' }, where: { userId: params.userId, diff --git a/api/test/unit/services/application.service.spec.ts b/api/test/unit/services/application.service.spec.ts index 79aa889457..2ad01fb12f 100644 --- a/api/test/unit/services/application.service.spec.ts +++ b/api/test/unit/services/application.service.spec.ts @@ -1601,6 +1601,9 @@ describe('Testing application service', () => { mockedValue, ); expect(prisma.applications.findFirst).toHaveBeenCalledWith({ + select: { + id: true, + }, orderBy: { createdAt: 'desc' }, where: { userId: 'example Id',