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',