Skip to content

Commit

Permalink
feat: Remove project IDs from workspace role export data and update t…
Browse files Browse the repository at this point in the history
…ests (keyshade-xyz#448)

Signed-off-by: Meeran Tofiq <[email protected]>
  • Loading branch information
Meeran-Tofiq authored and Kiranchaudhary537 committed Oct 13, 2024
1 parent 0dc410e commit ec26c0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 1 addition & 6 deletions apps/api/src/workspace/service/workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,7 @@ export class WorkspaceService {
description: true,
colorCode: true,
hasAdminAuthority: true,
authorities: true,
projects: {
select: {
id: true
}
}
authorities: true
}
})

Expand Down
7 changes: 7 additions & 0 deletions apps/api/src/workspace/workspace.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,13 @@ describe('Workspace Controller Tests', () => {
expect(body.icon).toEqual(workspace1.icon)
expect(body.workspaceRoles).toBeInstanceOf(Array)
expect(body.projects).toBeInstanceOf(Array)

const exampleWorkspaceRole = body.workspaceRoles[0]
expect(exampleWorkspaceRole).toHaveProperty('name')
expect(exampleWorkspaceRole).toHaveProperty('description')
expect(exampleWorkspaceRole).toHaveProperty('hasAdminAuthority')
expect(exampleWorkspaceRole).toHaveProperty('authorities')
expect(exampleWorkspaceRole).toHaveProperty('colorCode')
})
})

Expand Down

0 comments on commit ec26c0b

Please sign in to comment.