diff --git a/apps/api/src/project/project.e2e.spec.ts b/apps/api/src/project/project.e2e.spec.ts index df558f6b..868733a3 100644 --- a/apps/api/src/project/project.e2e.spec.ts +++ b/apps/api/src/project/project.e2e.spec.ts @@ -38,6 +38,7 @@ import { VariableService } from '../variable/service/variable.service' import { VariableModule } from '../variable/variable.module' import { SecretModule } from '../secret/secret.module' import { EnvironmentModule } from '../environment/environment.module' +import { QueryTransformPipe } from '../common/query.transform.pipe' describe('Project Controller Tests', () => { let app: NestFastifyApplication @@ -86,6 +87,8 @@ describe('Project Controller Tests', () => { secretService = moduleRef.get(SecretService) variableService = moduleRef.get(VariableService) + app.useGlobalPipes(new QueryTransformPipe()) + await app.init() await app.getHttpAdapter().getInstance().ready() }) diff --git a/apps/api/src/project/service/project.service.ts b/apps/api/src/project/service/project.service.ts index 88527fb8..ab3badf1 100644 --- a/apps/api/src/project/service/project.service.ts +++ b/apps/api/src/project/service/project.service.ts @@ -612,8 +612,8 @@ export class ProjectService { forksAllowed.length, `/project/${projectId}/forks`, { - page: Number(page), - limit: Number(limit) + page, + limit } ) @@ -654,7 +654,7 @@ export class ProjectService { const items = ( await this.prisma.project.findMany({ skip: page * limit, - take: Number(limit), + take: limit, orderBy: { [sort]: order }, @@ -710,8 +710,8 @@ export class ProjectService { }) const metadata = paginate(totalCount, `/project/all/${workspaceId}`, { - page: Number(page), - limit: Number(limit), + page, + limit, sort, order, search