diff --git a/composer.json b/composer.json index 3058906..93a2bf7 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "fleetbase/registry-bridge", - "version": "0.0.15", + "version": "0.0.16", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "keywords": [ "fleetbase-extension", diff --git a/extension.json b/extension.json index 461173b..375b29b 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Registry Bridge", - "version": "0.0.15", + "version": "0.0.16", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "repository": "https://github.com/fleetbase/registry-bridge", "license": "AGPL-3.0-or-later", diff --git a/package.json b/package.json index 96b40c8..82b7090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/registry-bridge-engine", - "version": "0.0.15", + "version": "0.0.16", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "fleetbase": { "route": "extensions" diff --git a/server/src/Http/Controllers/Internal/v1/RegistryController.php b/server/src/Http/Controllers/Internal/v1/RegistryController.php index e588b3b..db59d61 100644 --- a/server/src/Http/Controllers/Internal/v1/RegistryController.php +++ b/server/src/Http/Controllers/Internal/v1/RegistryController.php @@ -44,7 +44,7 @@ public function categories() */ public function getInstalledEngines(Request $request) { - if ($request->user() && $request->session()->has('company')) { + if ($request->session()->has('company')) { $installedExtensions = RegistryExtension::disableCache()->whereHas('installs', function ($query) { $query->where('company_uuid', session('company')); })->get()->map(function ($extension) { @@ -72,7 +72,7 @@ public function getEngineInstallStatus(Request $request) { $engine = $request->input('engine'); - if ($request->user() && $request->session()->has('company') && $engine) { + if ($request->session()->has('company') && $engine) { $installed = RegistryExtension::disableCache() ->whereHas( 'currentBundle', diff --git a/server/src/routes.php b/server/src/routes.php index 5dac42c..e4929ff 100644 --- a/server/src/routes.php +++ b/server/src/routes.php @@ -14,8 +14,6 @@ */ // Lookup package endpoint Route::get(config('internals.api.routing.prefix', '~registry') . '/v1/lookup', 'Fleetbase\RegistryBridge\Http\Controllers\Internal\v1\RegistryController@lookupPackage'); -Route::get(config('internals.api.routing.prefix', '~registry') . '/v1/engines', 'Fleetbase\RegistryBridge\Http\Controllers\Internal\v1\RegistryController@getInstalledEngines'); -Route::get(config('internals.api.routing.prefix', '~registry') . '/v1/engine-install-status', 'Fleetbase\RegistryBridge\Http\Controllers\Internal\v1\RegistryController@getEngineInstallStatus'); Route::prefix(config('internals.api.routing.prefix', '~registry'))->middleware(['fleetbase.registry'])->namespace('Fleetbase\RegistryBridge\Http\Controllers')->group( function ($router) { /* @@ -38,6 +36,8 @@ function ($router) { $router->group(['middleware' => ['fleetbase.protected', 'throttle:60,1']], function ($router) { $router->get('categories', 'RegistryController@categories'); + $router->get('engines', 'RegistryController@getInstalledEngines'); + $router->get('engine-install-status', 'RegistryController@getEngineInstallStatus'); $router->group(['prefix' => 'installer'], function ($router) { $router->post('install', 'ExtensionInstallerController@install');