Update JenisLogController.java
Clean code
This commit is contained in:
parent
7c24ab5bc1
commit
6ec433d135
@ -29,19 +29,19 @@ import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/log/jenis")
|
@RequestMapping("/log/jenis")
|
||||||
public class JenisLogController {
|
public class JenisLogController {
|
||||||
private static final Logger LOGGER = getLogger(JenisLogController.class);
|
private static final Logger LOGGER = getLogger(JenisLogController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private JenisLogService jenisLogService;
|
private JenisLogService jenisLogService;
|
||||||
|
|
||||||
@RequestMapping(method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
@RequestMapping(method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<String> addVO(@Valid @RequestBody List<JenisLogVO> vos, HttpServletRequest request) {
|
public ResponseEntity<String> addVO(@Valid @RequestBody List<JenisLogVO> vos, HttpServletRequest request) {
|
||||||
try {
|
try {
|
||||||
jenisLogService.save(vos);
|
jenisLogService.save(vos);
|
||||||
return RestUtil.getJsonResponse(CREATED.getReasonPhrase(), CREATED);
|
return RestUtil.getJsonResponse(CREATED.getReasonPhrase(), CREATED);
|
||||||
} catch (ServiceVOException e) {
|
} catch (ServiceVOException e) {
|
||||||
LOGGER.error("Got exception {} when add Agama", e.getMessage());
|
LOGGER.error("Got exception {} when add jenis log", e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(INTERNAL_SERVER_ERROR);
|
return RestUtil.getJsonHttptatus(INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user