feat(machine): support skeleton reconfiguration
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { MachinesService } from './machines.service';
|
||||
import { CreateMachineDto, UpdateMachineDto } from '../shared/dto/machine.dto';
|
||||
import {
|
||||
CreateMachineDto,
|
||||
UpdateMachineDto,
|
||||
ReconfigureMachineDto,
|
||||
} from '../shared/dto/machine.dto';
|
||||
|
||||
@Controller('machines')
|
||||
export class MachinesController {
|
||||
@@ -26,6 +30,14 @@ export class MachinesController {
|
||||
return this.machinesService.update(id, updateMachineDto);
|
||||
}
|
||||
|
||||
@Patch(':id/skeleton')
|
||||
reconfigure(
|
||||
@Param('id') id: string,
|
||||
@Body() reconfigureMachineDto: ReconfigureMachineDto,
|
||||
) {
|
||||
return this.machinesService.reconfigure(id, reconfigureMachineDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.machinesService.remove(id);
|
||||
|
||||
Reference in New Issue
Block a user