use of uk.ac.bbsrc.tgac.miso.dto.LabDto in project miso-lims by miso-lims.
the class LabRestController method createLab.
@PostMapping(headers = { "Content-type=application/json" })
@ResponseBody
public LabDto createLab(@RequestBody LabDto labDto, UriComponentsBuilder uriBuilder) throws IOException {
LabDto saved = RestUtils.createObject("Lab", labDto, Dtos::to, labService, Dtos::asDto);
constantsController.refreshConstants();
return saved;
}
use of uk.ac.bbsrc.tgac.miso.dto.LabDto in project miso-lims by miso-lims.
the class LabRestController method updateLab.
@PutMapping(value = "/{id}", headers = { "Content-type=application/json" })
@ResponseBody
public LabDto updateLab(@PathVariable("id") Long id, @RequestBody LabDto labDto, UriComponentsBuilder uriBuilder) throws IOException {
LabDto updated = RestUtils.updateObject("Lab", id, labDto, Dtos::to, labService, Dtos::asDto);
constantsController.refreshConstants();
return updated;
}
Aggregations