feat: added project detail API
This commit is contained in:
@@ -79,4 +79,16 @@ export class ProjectController {
|
||||
): Promise<{ projects: TMProject[]; count: number; paginate: true }> {
|
||||
return this.projectService.findUserProjects(userId, paramDto.id, pagination);
|
||||
}
|
||||
|
||||
@Get("project/:id")
|
||||
@ApiOperation({summary: "Get project detail"})
|
||||
@ApiResponse({status: 200, description: "Got Project Detail Successfully!"})
|
||||
@ApiResponse({status: 400, description: "Bad request!"})
|
||||
@ApiResponse({status: 404, description: "The project was not found!"})
|
||||
getProjectDetail(@Param() paramDto: ParamDto,
|
||||
@UserDec('id') userId: string
|
||||
): Promise<TMProject | null> {
|
||||
return this.projectService.getProjectDetail(paramDto.id, userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user