Skip to content

Commit

Permalink
Remove explicit number conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
muntaxir4 authored and rajdip-b committed Jul 29, 2024
1 parent 4daa07b commit 3f73fc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/api/src/workspace-role/service/workspace-role.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export class WorkspaceRoleService {
}
},
skip: page * limit,
take: Number(limit),
take: limit,
orderBy: {
[sort]: order
}
Expand All @@ -340,8 +340,8 @@ export class WorkspaceRoleService {
totalCount,
`/workspace-role/${workspaceId}/all`,
{
page: Number(page),
limit: Number(limit),
page,
limit,
sort,
order,
search
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/workspace-role/workspace-role.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { EventModule } from '../event/event.module'
import { WorkspaceRoleService } from './service/workspace-role.service'
import { UserService } from '../user/service/user.service'
import { UserModule } from '../user/user.module'
import { QueryTransformPipe } from '../common/query.transform.pipe'

describe('Workspace Role Controller Tests', () => {
let app: NestFastifyApplication
Expand Down Expand Up @@ -58,6 +59,8 @@ describe('Workspace Role Controller Tests', () => {
workspaceRoleService = moduleRef.get(WorkspaceRoleService)
userService = moduleRef.get(UserService)

app.useGlobalPipes(new QueryTransformPipe())

await app.init()
await app.getHttpAdapter().getInstance().ready()
})
Expand Down

0 comments on commit 3f73fc2

Please sign in to comment.