./lib/dolt/sinatra/actions.rb in dolt-0.3.1 vs ./lib/dolt/sinatra/actions.rb in dolt-0.4.0

- old
+ new

@@ -87,8 +87,19 @@ return error(err, repo, ref) if !err.nil? response["Content-Type"] = "application/json" body(renderer.render(:refs, data, :layout => nil)) end end + + def tree_history(repo, ref, path, count = 1) + actions.tree_history(repo, ref, path, count) do |err, data| + if !err.nil? + error(err, repo, ref) + else + response["Content-Type"] = "application/json" + body(renderer.render(:tree_history, data, :layout => nil)) + end + end + end end end end