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 22bf361 commit 3562a4c
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/variable/service/variable.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ export class VariableService {
}
},
skip: page * limit,
take: Number(limit),
take: limit,
orderBy: {
[sort]: order
}
Expand Down Expand Up @@ -615,8 +615,8 @@ export class VariableService {
})

const metadata = paginate(totalCount, `/variable/${projectId}`, {
page: Number(page),
limit: Number(limit),
page,
limit,
sort,
order,
search
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/variable/variable.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { mockDeep } from 'jest-mock-extended'
import { RedisClientType } from 'redis'
import { UserService } from '../user/service/user.service'
import { UserModule } from '../user/user.module'
import { QueryTransformPipe } from '../common/query.transform.pipe'

describe('Variable Controller Tests', () => {
let app: NestFastifyApplication
Expand Down Expand Up @@ -83,6 +84,8 @@ describe('Variable Controller Tests', () => {
eventService = moduleRef.get(EventService)
userService = moduleRef.get(UserService)

app.useGlobalPipes(new QueryTransformPipe())

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

0 comments on commit 3562a4c

Please sign in to comment.