Fixed my fix to fix the 500 error on /api/application/nodes when not specifying a daemon_base (#1182)

This commit is contained in:
Jacob Gee-Clarke 2018-06-02 22:34:01 +01:00 committed by Dane Everitt
parent 7319ef1b60
commit d73e5a2274

View file

@ -74,7 +74,7 @@ class StoreNodeRequest extends ApplicationApiRequest
$response = parent::validated();
$response['daemonListen'] = $response['daemon_listen'];
$response['daemonSFTP'] = $response['daemon_sftp'];
$response['daemonBase'] = $response['daemon_base'];
$response['daemonBase'] = $response['daemon_base'] ?? (new Node)->getAttribute('daemonBase');
unset($response['daemon_base'], $response['daemon_listen'], $response['daemon_sftp']);