Skip to content
Snippets Groups Projects
Commit 0b9f619f authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

update to Models.tree

parent d9bb2926
No related branches found
No related tags found
2 merge requests!552Production Release | nshmp-haz,!548Resolves: Web service(s) for source model mining
......@@ -38,14 +38,9 @@ public class SourceLogicTreesService {
var url = request.getUri().getPath();
try {
var tree = ServletUtil.model().tree(id);
var tree = Models.tree(ServletUtil.model(), id);
var requestData = new RequestData(id);
if (tree.isEmpty()) {
throw new RuntimeException(String.format("Id [%s] not found", id));
}
var response = new Response<>(Status.SUCCESS, NAME, requestData, tree.get(), url);
var response = new Response<>(Status.SUCCESS, NAME, requestData, tree, url);
return HttpResponse.ok(ServletUtil.GSON.toJson(response));
} catch (Exception e) {
return ServicesUtil.handleError(e, NAME, url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment