X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2FController%2FGithub%2FIndex.php;h=343c16f7e922b15be2942e3838ade6a726b29ec8;hb=303950054385d4c55cfef9a8828ee79420b7366e;hp=8b6da0328abe80908c0c2e9dd99c7117854cb553;hpb=9e35d9e1f6adb610b17e940616cd1dc4ec8aa0d7;p=pharext%2Fpharext.org diff --git a/app/Controller/Github/Index.php b/app/Controller/Github/Index.php index 8b6da03..343c16f 100644 --- a/app/Controller/Github/Index.php +++ b/app/Controller/Github/Index.php @@ -8,17 +8,18 @@ use app\Github\API\Repos\ReposCallback; class Index extends Github { function __invoke(array $args = null) { - if ($this->checkToken()) { - $this->github->listRepos( - $this->app->getRequest()->getQuery("page") - )->then( - new ReposCallback($this->github) - )->done(function($results) { - list(list($repos, $links)) = $results; - $this->app->display("github/index", compact("repos", "links")); - }); - - $this->github->drain(); + if (!$this->checkToken()) { + return; } + $this->github->listRepos( + $this->app->getRequest()->getQuery("page") + )->then( + new ReposCallback($this->github) + )->done(function($results) { + list(list($repos, $links)) = $results; + $this->app->display("github/index", compact("repos", "links")); + }); + + $this->github->drain(); } }