fix: Fix ottenimento moduli da endpoint

This commit is contained in:
Maicol Battistini 2022-02-02 00:33:14 +01:00
parent 2873fa67dc
commit 072b55aca6
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
2 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,8 @@ class Controller extends BaseController
$osm_modules = collect($module->extra->{'osm-modules'});
$module->config = $osm_modules
->mapWithKeys(fn($item, $name) => config("$name"))
->whereNotNull()
->mapWithKeys(fn($item, $name) => config($name) ?? include base_path("vendor/$module->name/config/{$name}.php"))
->reject(null)
->all();
// Modules (for Frontend)
@ -38,6 +38,7 @@ class Controller extends BaseController
$item->moduleFullName = $module->name;
$item->moduleVendor = $split[0];
$item->moduleName = $split[1];
return $item;
});

View File

@ -31,6 +31,7 @@ class Server extends BaseServer
->pluck('config.api.schemas')
->reject(null)
->push(UserSchema::class)
->flatten()
->all();
}