From cad2c07a353b032436d39ba5ee590aac8174fc69 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Jan 2014 18:17:33 +0100 Subject: [PATCH] Fix broken redirects --- src/lib/Hydra/Controller/Admin.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/Admin.pm b/src/lib/Hydra/Controller/Admin.pm index df14212f..95666f07 100644 --- a/src/lib/Hydra/Controller/Admin.pm +++ b/src/lib/Hydra/Controller/Admin.pm @@ -39,14 +39,14 @@ sub clear_queue_non_current : Chained('admin') PathPart('clear-queue-non-current }); my $n = cancelBuilds($c->model('DB')->schema, $builds); $c->flash->{successMsg} = "$n builds have been cancelled."; - $c->res->redirect($c->request->referer // "/admin"); + $c->res->redirect($c->request->referer // "/"); } sub clearfailedcache : Chained('admin') PathPart('clear-failed-cache') Args(0) { my ($self, $c) = @_; my $r = `nix-store --clear-failed-paths '*'`; - $c->res->redirect($c->request->referer // "/admin"); + $c->res->redirect($c->request->referer // "/"); } @@ -57,7 +57,7 @@ sub clearvcscache : Chained('admin') PathPart('clear-vcs-cache') Args(0) { $c->model('DB::CachedSubversionInputs')->delete; $c->model('DB::CachedBazaarInputs')->delete; $c->flash->{successMsg} = "VCS caches have been cleared."; - $c->res->redirect($c->request->referer // "/admin"); + $c->res->redirect($c->request->referer // "/"); }