fix: remove unused params from get all projects api

This commit is contained in:
Mhd Zayd Skaff
2025-05-20 14:40:48 +03:00
parent 5292271721
commit f7fd96afa1
2 changed files with 13 additions and 8 deletions

View File

@ -1,4 +1,6 @@
import { ControllerRoute } from '@app/common/constants/controller-route';
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
import {
Body,
Controller,
@ -13,7 +15,6 @@ import {
Res,
UseGuards,
} from '@nestjs/common';
import { Response } from 'express';
import {
ApiBearerAuth,
ApiOperation,
@ -21,11 +22,10 @@ import {
ApiResponse,
ApiTags,
} from '@nestjs/swagger';
import { ProjectService } from '../services';
import { Response } from 'express';
import { CreateProjectDto, GetProjectParam } from '../dto';
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
import { PaginationRequestGetListDto } from '@app/common/dto/pagination.request.dto';
import { ListProjectsDto } from '../dto/list-project.dto';
import { ProjectService } from '../services';
@ApiTags('Project Module')
@Controller({
@ -80,9 +80,7 @@ export class ProjectController {
description: ControllerRoute.PROJECT.ACTIONS.LIST_PROJECTS_DESCRIPTION,
})
@Get()
async list(
@Query() query: PaginationRequestGetListDto,
): Promise<BaseResponseDto> {
async list(@Query() query: ListProjectsDto): Promise<BaseResponseDto> {
return this.projectService.listProjects(query);
}

View File

@ -0,0 +1,7 @@
import { PaginationRequestGetListDto } from '@app/common/dto/pagination.request.dto';
import { PickType } from '@nestjs/swagger';
export class ListProjectsDto extends PickType(PaginationRequestGetListDto, [
'page',
'size',
]) {}