Commit c79e2fc0 authored by nanahira's avatar nanahira

fix openapi

parent 5bad7146
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
StreamableFile, StreamableFile,
} from '@nestjs/common'; } from '@nestjs/common';
import { AppService } from './app.service'; import { AppService } from './app.service';
import { ApiOperation, ApiParam } from '@nestjs/swagger'; import { ApiOperation, ApiParam, ApiProduces } from '@nestjs/swagger';
import { BlankReturnMessageDto } from './dto/ReturnMessage.dto'; import { BlankReturnMessageDto } from './dto/ReturnMessage.dto';
@Controller() @Controller()
...@@ -21,6 +21,7 @@ export class AppController { ...@@ -21,6 +21,7 @@ export class AppController {
@ApiParam({ name: 'username', description: '用户名' }) @ApiParam({ name: 'username', description: '用户名' })
@ApiParam({ name: 'size', description: '头像尺寸', type: 'number' }) @ApiParam({ name: 'size', description: '头像尺寸', type: 'number' })
@ApiParam({ name: 'filename', description: '头像文件名' }) @ApiParam({ name: 'filename', description: '头像文件名' })
@ApiProduces('image/png')
async getImage( async getImage(
@Param('username') username: string, @Param('username') username: string,
@Param('size', ParseIntPipe) size: number, @Param('size', ParseIntPipe) size: number,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment