doc: users controller

This commit is contained in:
GitBluub
2023-09-20 03:40:40 +02:00
committed by Bluub
parent 4416808056
commit 711b5d583b

View File

@@ -1,6 +1,6 @@
import { Controller, Get, Param, NotFoundException, Response } from '@nestjs/common';
import { UsersService } from './users.service';
import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';
import { ApiNotFoundResponse, ApiOkResponse, ApiTags } from '@nestjs/swagger';
import { User } from 'src/models/user';
@ApiTags('users')
@@ -22,6 +22,7 @@ export class UsersController {
}
@Get(':id/picture')
@ApiOkResponse({description: 'Return the profile picture of the requested user'})
async getPicture(@Response() res: any, @Param('id') id: number) {
return await this.usersService.getProfilePicture(+id, res);
}