class ServerController {

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors) throws Exception {
        ValidateResult validateRes = serverService.validatePermision(user, errors)
                .addAssert(() -> serverService.deleteDataCenter(user, server))
                .addAssert(() -> serverService.deleteServer(server))
                .validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}