feat: added fineOne API for workspace & project for update purposes

This commit is contained in:
2026-07-09 20:39:08 +03:30
parent 4cb20f6c0d
commit 9ded147354
4 changed files with 21 additions and 6 deletions
@@ -20,6 +20,15 @@ import { ITokenPayload } from "../../auth/interfaces/IToken-payload";
export class ProjectController {
constructor(private readonly projectService: ProjectService) {}
@Get(':id')
@ApiOperation({summary: 'Get one project by ID'})
@ApiResponse({status: 200, description: 'received the project successfully!'})
@ApiResponse({status: 404, description: 'Project Not Found!'})
@ApiResponse({status: 400, description: 'Bad Request!'})
findOne(@Param('id') id: string) {
return this.projectService.findOneOrFail(id);
}
@Post()
@PermissionsDec(PermissionEnum.PROJECT)
@ApiOperation({ summary: "Create a new project" })
@@ -63,7 +72,7 @@ export class ProjectController {
return this.projectService.findUserProjectsByWorkspace(user.id, user.permissions, paramDto.id, pagination);
}
@Get("project/:id")
@Get("detail/:id")
@ApiOperation({ summary: "Get project detail" })
@ApiResponse({ status: 200, description: "Got Project Detail Successfully!" })
@ApiResponse({ status: 400, description: "Bad request!" })