mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +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 { 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 {
|
import {
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
@ -13,7 +15,6 @@ import {
|
|||||||
Res,
|
Res,
|
||||||
UseGuards,
|
UseGuards,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { Response } from 'express';
|
|
||||||
import {
|
import {
|
||||||
ApiBearerAuth,
|
ApiBearerAuth,
|
||||||
ApiOperation,
|
ApiOperation,
|
||||||
@ -21,11 +22,10 @@ import {
|
|||||||
ApiResponse,
|
ApiResponse,
|
||||||
ApiTags,
|
ApiTags,
|
||||||
} from '@nestjs/swagger';
|
} from '@nestjs/swagger';
|
||||||
import { ProjectService } from '../services';
|
import { Response } from 'express';
|
||||||
import { CreateProjectDto, GetProjectParam } from '../dto';
|
import { CreateProjectDto, GetProjectParam } from '../dto';
|
||||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
import { ListProjectsDto } from '../dto/list-project.dto';
|
||||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
import { ProjectService } from '../services';
|
||||||
import { PaginationRequestGetListDto } from '@app/common/dto/pagination.request.dto';
|
|
||||||
|
|
||||||
@ApiTags('Project Module')
|
@ApiTags('Project Module')
|
||||||
@Controller({
|
@Controller({
|
||||||
@ -80,9 +80,7 @@ export class ProjectController {
|
|||||||
description: ControllerRoute.PROJECT.ACTIONS.LIST_PROJECTS_DESCRIPTION,
|
description: ControllerRoute.PROJECT.ACTIONS.LIST_PROJECTS_DESCRIPTION,
|
||||||
})
|
})
|
||||||
@Get()
|
@Get()
|
||||||
async list(
|
async list(@Query() query: ListProjectsDto): Promise<BaseResponseDto> {
|
||||||
@Query() query: PaginationRequestGetListDto,
|
|
||||||
): Promise<BaseResponseDto> {
|
|
||||||
return this.projectService.listProjects(query);
|
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