+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<LabInfo> saveLab(@RequestBody LabInfo labInfo) {
+ try {
+ service.saveLab(labInfo);
+ return new ResponseEntity<>(labInfo, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Save of lab failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteLab(@RequestBody LabInfo labInfo) {
+ try {
+ service.deleteLab(labInfo);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Deletion of lab failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }