fix saveToCache() usage; move hook controllers around
[pharext/pharext.org] / app / Controller / Github.php
index 6432c868670550c0355fdaad16e7a4e9087e6e2b..0c38bd7721cb3daf40f36e65ac8dbcf9a389e271 100644 (file)
@@ -26,7 +26,7 @@ abstract class Github implements Controller
         * @var \app\Session
         */
        protected $session;
-
+       
        function __construct(Web $app, API $github, Session $session) {
                $this->app = $app;
                $this->github = $github;
@@ -58,7 +58,7 @@ abstract class Github implements Controller
                if ($repo->hooks) {
                        foreach ($repo->hooks as $hook) {
                                if ($hook->name === "web" && $hook->config->url === $this->github->getConfig()->hook->url) {
-                                       return $hook->id;
+                                       return $hook;
                                }
                        }
                }