mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 20:49:42 +03:00
Added ban and unban to Swagger
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user