X-Git-Url: https://git.m6w6.name/?p=pharext%2Fpharext.org;a=blobdiff_plain;f=app%2FController%2FGithub%2FIndex.php;h=935f249e3fa6e0238f8881c2d31d2bae694622be;hp=f55eb0c2e4cdece8ebbc739199bd5f83705a2937;hb=07b87ac26f62bc3c069bb16983fe7500272e19b4;hpb=ff1d11c17adb6453aa50dfd6169317e077240eef diff --git a/app/Controller/Github/Index.php b/app/Controller/Github/Index.php index f55eb0c..935f249 100644 --- a/app/Controller/Github/Index.php +++ b/app/Controller/Github/Index.php @@ -4,27 +4,20 @@ namespace app\Controller\Github; use app\Controller\Github; -use http\QueryString; - class Index extends Github { function __invoke(array $args = null) { if ($this->checkToken()) { - try { - $this->github->fetchRepos( - $this->app->getRequest()->getQuery("page"), - [$this, "reposCallback"] - )->send(); - } catch (\app\Github\Exception $exception) { - $this->view->addData(compact("exception")); - } + $this->github->fetchRepos( + $this->app->getRequest()->getQuery("page"), + [$this, "reposCallback"] + )->send(); $this->app->display("github/index"); } } function reposCallback($repos, $links) { - $this->app->getView()->addData(compact("repos")); - $this->app->getView()->registerFunction("link", $this->createLinkGenerator($links)); + $this->app->getView()->addData(compact("repos", "links")); foreach ($repos as $repo) { $this->github->fetchHooks($repo->full_name, function($hooks) use($repo) {