Skip to content

Commit

Permalink
CI4 Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-4Spaces committed Aug 21, 2019
1 parent 0437991 commit 46f6c1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ public static function preSystem() {
*/
self::$config = Config::get('RestExtension');

/*
* Setup Database connection
*/
self::$database = Database::connect(self::$config->databaseGroupName ?? 'default');

/*
* Api Routing
*/
if(self::$config) {

/*
* Setup Database connection
*/
self::$database = Database::connect(self::$config->databaseGroupName ?? 'default');

$routes = Services::routes(true);

if(self::$config->enableApiRouting && self::$database->tableExists('api_routes')) {
Expand Down

0 comments on commit 46f6c1d

Please sign in to comment.