Skip to content

Commit

Permalink
Fixed some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil2000 committed Oct 16, 2024
1 parent 8b3be35 commit f30df2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
4 changes: 0 additions & 4 deletions apps/api/src/variable/service/variable.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export class VariableService {
},
versions: {
select: {
environmentId: true,
environment: {
select: {
id: true,
Expand Down Expand Up @@ -250,7 +249,6 @@ export class VariableService {
},
select: {
id: true,
environmentId: true,
environment: {
select: {
id: true,
Expand Down Expand Up @@ -520,7 +518,6 @@ export class VariableService {
},
select: {
value: true,
environmentId: true,
environment: {
select: {
id: true,
Expand Down Expand Up @@ -593,7 +590,6 @@ export class VariableService {
},
versions: {
select: {
environmentId: true,
environment: {
select: {
id: true,
Expand Down
15 changes: 1 addition & 14 deletions apps/api/src/variable/variable.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -125,10 +124,6 @@ describe('Variable Controller Tests', () => {
{
name: 'Environment 2',
description: 'Environment 2 description'
},
{
name: 'Test Environment',
description: 'Test environment description'
}
]
})) as Project
Expand All @@ -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,
{
Expand Down Expand Up @@ -196,7 +184,7 @@ describe('Variable Controller Tests', () => {
entries: [
{
value: 'Variable 3 value',
environmentId: environment3.id
environmentId: environment2.id
}
]
},
Expand All @@ -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: {
Expand Down

0 comments on commit f30df2b

Please sign in to comment.