From f30df2bbc855cf4d30dfe79f386cf43f0a8071c0 Mon Sep 17 00:00:00 2001 From: NIL2000 Date: Wed, 16 Oct 2024 19:39:17 +0530 Subject: [PATCH] Fixed some issues --- apps/api/src/variable/service/variable.service.ts | 4 ---- apps/api/src/variable/variable.e2e.spec.ts | 15 +-------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/apps/api/src/variable/service/variable.service.ts b/apps/api/src/variable/service/variable.service.ts index b19288cf..f1e6288b 100644 --- a/apps/api/src/variable/service/variable.service.ts +++ b/apps/api/src/variable/service/variable.service.ts @@ -120,7 +120,6 @@ export class VariableService { }, versions: { select: { - environmentId: true, environment: { select: { id: true, @@ -250,7 +249,6 @@ export class VariableService { }, select: { id: true, - environmentId: true, environment: { select: { id: true, @@ -520,7 +518,6 @@ export class VariableService { }, select: { value: true, - environmentId: true, environment: { select: { id: true, @@ -593,7 +590,6 @@ export class VariableService { }, versions: { select: { - environmentId: true, environment: { select: { id: true, diff --git a/apps/api/src/variable/variable.e2e.spec.ts b/apps/api/src/variable/variable.e2e.spec.ts index d232a46b..b7adbd31 100644 --- a/apps/api/src/variable/variable.e2e.spec.ts +++ b/apps/api/src/variable/variable.e2e.spec.ts @@ -53,7 +53,6 @@ describe('Variable Controller Tests', () => { let project1: Project let environment1: Environment let environment2: Environment - let environment3: Environment let variable1: Variable beforeAll(async () => { @@ -125,10 +124,6 @@ describe('Variable Controller Tests', () => { { name: 'Environment 2', description: 'Environment 2 description' - }, - { - name: 'Test Environment', - description: 'Test environment description' } ] })) as Project @@ -147,13 +142,6 @@ describe('Variable Controller Tests', () => { } }) - environment3 = await prisma.environment.findFirst({ - where: { - projectId: project1.id, - name: 'Test Environment' - } - }) - variable1 = (await variableService.createVariable( user1, { @@ -196,7 +184,7 @@ describe('Variable Controller Tests', () => { entries: [ { value: 'Variable 3 value', - environmentId: environment3.id + environmentId: environment2.id } ] }, @@ -216,7 +204,6 @@ describe('Variable Controller Tests', () => { expect(body.projectId).toBe(project1.id) expect(body.versions.length).toBe(1) expect(body.versions[0].value).toBe('Variable 3 value') - expect(body.versions[0].environment.slug).toBe(environment3.slug) const variable = await prisma.variable.findUnique({ where: {