use of uk.ac.bbsrc.tgac.miso.dto.SampleClassDto in project miso-lims by miso-lims.
the class SampleClassRestController method updateSampleClass.
@PutMapping(value = "/{id}", headers = { "Content-type=application/json" })
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public SampleClassDto updateSampleClass(@PathVariable("id") long id, @RequestBody SampleClassDto sampleClassDto) throws IOException {
return RestUtils.updateObject("Sample Class", id, sampleClassDto, Dtos::to, sampleClassService, sampleClass -> {
SampleClassDto dto = Dtos.asDto(sampleClass);
constantsController.refreshConstants();
return dto;
});
}
use of uk.ac.bbsrc.tgac.miso.dto.SampleClassDto in project miso-lims by miso-lims.
the class SampleClassRestController method createSampleClass.
@PostMapping(headers = { "Content-type=application/json" })
@ResponseStatus(HttpStatus.CREATED)
@ResponseBody
public SampleClassDto createSampleClass(@RequestBody SampleClassDto sampleClassDto) throws IOException {
return RestUtils.createObject("Sample Class", sampleClassDto, Dtos::to, sampleClassService, sampleClass -> {
SampleClassDto dto = Dtos.asDto(sampleClass);
constantsController.refreshConstants();
return dto;
});
}
Aggregations