finished control group api

This commit is contained in:
faris Aljohari
2024-03-12 13:36:11 +03:00
parent f0c65f63d6
commit 70020171c5
4 changed files with 76 additions and 1 deletions
+12
View File
@@ -12,6 +12,7 @@ import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { JwtAuthGuard } from '../../../libs/common/src/guards/jwt.auth.guard';
import { AddGroupDto } from '../dtos/add.group.dto';
import { GetGroupDto } from '../dtos/get.group.dto';
import { ControlGroupDto } from '../dtos/control.group.dto';
@ApiTags('Group Module')
@Controller({
@@ -45,4 +46,15 @@ export class GroupController {
throw new Error(err);
}
}
// @ApiBearerAuth()
// @UseGuards(JwtAuthGuard)
@Post('control')
async controlGroup(@Body() controlGroupDto: ControlGroupDto) {
try {
return await this.groupService.controlGroup(controlGroupDto);
} catch (err) {
throw new Error(err);
}
}
}