So this is the final part which is needed in order to be able to deliver custom channels, everything else is now just polishing.
We do this by simply redirecting to the build product download URL and we use binary_cache_url the same way as in NixChannel.pm.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
JLGDA7AMM6P5J3NAIL4OR4DMG5J7TLCZKPBNOQLNCNKHLLVEX5HQC
}
sub nixexprs : Chained('channel') PathPart('') Args(1) {
my ($self, $c, $productName) = @_;
my $product = $c->stash->{lastSuccessful}->buildproducts->find(
{ type => "channel", name => $productName }
);
my $url = $c->uri_for(
$c->controller("Build")->action_for("download"),
[$c->stash->{lastSuccessful}->id],
$product->productnr,
$productName
);
$c->res->redirect($url);