diff --git a/apps/api/src/workspace-role/service/workspace-role.service.ts b/apps/api/src/workspace-role/service/workspace-role.service.ts index 020aecba..6212dc42 100644 --- a/apps/api/src/workspace-role/service/workspace-role.service.ts +++ b/apps/api/src/workspace-role/service/workspace-role.service.ts @@ -320,7 +320,7 @@ export class WorkspaceRoleService { } }, skip: page * limit, - take: Number(limit), + take: limit, orderBy: { [sort]: order } @@ -340,8 +340,8 @@ export class WorkspaceRoleService { totalCount, `/workspace-role/${workspaceId}/all`, { - page: Number(page), - limit: Number(limit), + page, + limit, sort, order, search diff --git a/apps/api/src/workspace-role/workspace-role.e2e.spec.ts b/apps/api/src/workspace-role/workspace-role.e2e.spec.ts index f2f2205e..336774d6 100644 --- a/apps/api/src/workspace-role/workspace-role.e2e.spec.ts +++ b/apps/api/src/workspace-role/workspace-role.e2e.spec.ts @@ -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 @@ -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() })