Skip to content

Commit

Permalink
allows clearing out a DB interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorwick committed Jun 19, 2017
1 parent a656274 commit b9eb993
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,11 @@ public String viewGraph(Map<String, Object> model,
return "viewgraph";
}

@PostMapping(value="/dbs/clear/{dbname}")
public RedirectView clearDB(@PathVariable("dbname") String dbname) {
final DBInterface db = (DBInterface)appContext.getBean(dbname);
db.getGraphIDStream().forEach(db::deleteGraph);
return new RedirectView("/dbs/view/"+dbname);
}

}

0 comments on commit b9eb993

Please sign in to comment.