Skip to content

Commit

Permalink
Merge pull request #15 from fleetbase/dev-v0.0.16
Browse files Browse the repository at this point in the history
v0.0.16 - hotfix the engine install status routes
  • Loading branch information
roncodes authored Oct 8, 2024
2 parents 2554590 + 18ccaa4 commit 2f9a253
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions server/src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand All @@ -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');
Expand Down

0 comments on commit 2f9a253

Please sign in to comment.