mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 10:47:54 +00:00
finished delete group api
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
Query,
|
||||
Param,
|
||||
Put,
|
||||
Delete,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../../../libs/common/src/guards/jwt.auth.guard';
|
||||
@@ -70,4 +71,15 @@ export class GroupController {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Delete(':groupId')
|
||||
async deleteGroup(@Param('groupId') groupId: number) {
|
||||
try {
|
||||
return await this.groupService.deleteGroup(groupId);
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user