feat: added fineOne API for workspace & project for update purposes
This commit is contained in:
@@ -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!" })
|
||||
|
||||
Reference in New Issue
Block a user