mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 18:04:54 +00:00
added space model delete
This commit is contained in:
@ -2,6 +2,7 @@ import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
@ -32,7 +33,7 @@ export class SpaceModelController {
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(PermissionsGuard)
|
||||
@Permissions('SPACE_MODULE_ADD')
|
||||
@Permissions('SPACE_MODEL_ADD')
|
||||
@ApiOperation({
|
||||
summary: ControllerRoute.SPACE_MODEL.ACTIONS.CREATE_SPACE_MODEL_SUMMARY,
|
||||
description:
|
||||
@ -80,4 +81,17 @@ export class SpaceModelController {
|
||||
): Promise<BaseResponseDto> {
|
||||
return await this.spaceModelService.update(dto, param);
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(PermissionsGuard)
|
||||
@Permissions('SPACE_MODEL_DELETE')
|
||||
@ApiOperation({
|
||||
summary: ControllerRoute.SPACE_MODEL.ACTIONS.DELETE_SPACE_MODEL_SUMMARY,
|
||||
description:
|
||||
ControllerRoute.SPACE_MODEL.ACTIONS.DELETE_SPACE_MODEL_DESCRIPTION,
|
||||
})
|
||||
@Delete(':spaceModelUuid')
|
||||
async delete(@Param() param: SpaceModelParam): Promise<BaseResponseDto> {
|
||||
return await this.spaceModelService.deleteSpaceModel(param);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user