From a919b503fb0c89c5141f17ac68c9f2af62360189 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Oct 2013 19:53:11 +0100 Subject: [PATCH] Restore api/get-info --- src/lib/Hydra/Controller/Build.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 44182bfc..cba1f93d 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -493,6 +493,17 @@ sub add_to_release : Chained('buildChain') PathPart('add-to-release') Args(0) { } +sub get_info : Chained('buildChain') PathPart('api/get-info') Args(0) { + my ($self, $c) = @_; + my $build = $c->stash->{build}; + $c->stash->{json}->{buildId} = $build->id; + $c->stash->{json}->{drvPath} = $build->drvpath; + my $out = getMainOutput($build); + $c->stash->{json}->{outPath} = $out->path if defined $out; + $c->forward('View::JSON'); +} + + sub evals : Chained('buildChain') PathPart('evals') Args(0) { my ($self, $c) = @_;