Skip to content

Commit

Permalink
fix(blogs): Fix GET blog by id response type
Browse files Browse the repository at this point in the history
  • Loading branch information
sage-ali committed Mar 2, 2025
1 parent 5088a03 commit c4983f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/blogs/blogs.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ export class BlogController {
@ApiResponse({ status: 200, description: 'Blog fetched successfully.', type: BlogDto })
@ApiResponse({ status: 404, description: 'Blog not found.' })
@ApiResponse({ status: 500, description: 'Internal server error.' })
async getSingleBlog(@Param('id', new ParseUUIDPipe()) id: string, @Request() req): Promise<BlogDto> {
async getSingleBlog(
@Param('id', new ParseUUIDPipe()) id: string,
@Request() req
): Promise<{
status_code: number;
message: string;
data: BlogDto;
}> {
return await this.blogService.getSingleBlog(id, req.user);
}

Expand Down

0 comments on commit c4983f0

Please sign in to comment.