From a0e6d3f55e43e326c8a4bf8a31d027b41040b37d Mon Sep 17 00:00:00 2001 From: TED Vortex Date: Mon, 3 Apr 2023 17:28:08 +0200 Subject: [PATCH] fix: correct application return type image --- src/social-card/social-card.controller.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/social-card/social-card.controller.ts b/src/social-card/social-card.controller.ts index 6aa0f24..7a1cd3d 100644 --- a/src/social-card/social-card.controller.ts +++ b/src/social-card/social-card.controller.ts @@ -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 { const image = await this.socialCardService.getUserCard(username);