From 5d477ca630dc13c0f0ea9ec2d08016c5132a1907 Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Wed, 7 Feb 2024 21:52:54 +0300 Subject: [PATCH] Added ban and unban to Swagger --- backend/src/modules/user/user.controller.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/src/modules/user/user.controller.ts b/backend/src/modules/user/user.controller.ts index d5c376b..364b24a 100644 --- a/backend/src/modules/user/user.controller.ts +++ b/backend/src/modules/user/user.controller.ts @@ -1,4 +1,4 @@ -import { Body, Controller, Post, Put, Param } from '@nestjs/common'; +import { Body, Controller, Param, Post, Put } from '@nestjs/common'; import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { IGetUser } from './user.dto'; import { UserService } from './user.service'; @@ -15,13 +15,20 @@ export class UserController { async getUser(@Body() data: IGetUser) { return await this.userService.getUser(data); } + + @ApiOperation({ + description: 'Ban user by its telegram id', + }) @Put('ban/:id') async banUser(@Param('id') id: string) { return await this.userService.banUser(id); } + + @ApiOperation({ + description: 'Unban user by its telegram id', + }) @Put('unBan/:id') async unBanUser(@Param('id') id: string) { return await this.userService.unBanUser(id); } - }