Skip to content

Commit

Permalink
Remove explicit number conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
muntaxir4 committed Jul 28, 2024
1 parent 56ae1fc commit 5d9f06c
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/service/workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export class WorkspaceService {
//get all members of workspace for page with limit
const items = await this.prisma.workspaceMember.findMany({
skip: page * limit,
take: Number(limit),
take: limit,
orderBy: {
workspace: {
[sort]: order
Expand Down Expand Up @@ -538,8 +538,8 @@ export class WorkspaceService {
})

const metadata = paginate(totalCount, `/workspace/${workspaceId}/members`, {
page: Number(page),
limit: Number(limit),
page,
limit,
sort,
order,
search
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/workspace/workspace.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { EventModule } from '../event/event.module'
import { UserModule } from '../user/user.module'
import { UserService } from '../user/service/user.service'
import { WorkspaceService } from './service/workspace.service'
import { QueryTransformPipe } from '../common/query.transform.pipe'

const createMembership = async (
adminRoleId: string,
Expand Down Expand Up @@ -75,6 +76,8 @@ describe('Workspace Controller Tests', () => {
userService = moduleRef.get(UserService)
workspaceService = moduleRef.get(WorkspaceService)

app.useGlobalPipes(new QueryTransformPipe())

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

0 comments on commit 5d9f06c

Please sign in to comment.