mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-14 18:05:48 +00:00
fix: remove unused params from get all projects api
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
7
src/project/dto/list-project.dto.ts
Normal file
7
src/project/dto/list-project.dto.ts
Normal 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',
|
||||
]) {}
|
Reference in New Issue
Block a user