- }
-
- function reposCallback($repos, $links) {
- $this->app->getView()->addData(compact("repos", "links"));
+ $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"));
+ });