Skip to content

Commit

Permalink
fix: correct application return type image
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Apr 3, 2023
1 parent c12099a commit a0e6d3f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/social-card/social-card.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ export class SocialCardController {
) {}

@Get("/:username")
@Header('Content-Type', 'image/png')
@ApiOperation({
operationId: "generateUserSocialCard",
summary: "Gets latest cache aware social card link for :username or generates a new one",
})
@ApiOkResponse({ type: String })
// @ApiOkResponse({ type: String })
@ApiNotFoundResponse({ description: "User not found" })
async generateUserSocialCard (
@Param("username") username: string,
@Req() request: Request,
@Res() response: Response
): Promise<StreamableFile> {
const image = await this.socialCardService.getUserCard(username);

Expand Down

0 comments on commit a0e6d3f

Please sign in to comment.