mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add lnms commands to get and set config settings (#10534)
* add lnms commands to get and set config settings lnms config:get and lnms config:set Note: you cannot override settings in config.php * Update to check setting exists and value validation rules.
This commit is contained in:
@ -69,7 +69,7 @@ class SettingsController extends Controller
|
||||
return $this->jsonResponse($id, ":id is not a valid setting", null, 400);
|
||||
}
|
||||
|
||||
$dbConfig = \App\Models\Config::where('config_name', 'like', "$id%")->get();
|
||||
$dbConfig = \App\Models\Config::withChildren($id)->get();
|
||||
if ($dbConfig->isEmpty()) {
|
||||
return $this->jsonResponse($id, ":id is not set", $config->get($id)->default, 400);
|
||||
}
|
||||
|
Reference in New Issue
Block a user