Adding API route to set bgpPeerDescr field (#13056)

* Adding API route to set bgpPeerDescr field

* Fixing CI test

* Fixing CI test part 2

* Adding validation of bgpPeerId as integer and changing SQL request with question mark syntax.

* Fixing CI test

* Following murrant's advices to protect against SQL injection

* Use built in json function

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
geg347
2021-08-13 00:58:47 +02:00
committed by GitHub
parent 35dbb3e9cb
commit 6dbefd4a61
3 changed files with 57 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ Route::group(['prefix' => 'v0', 'namespace' => '\App\Api\Controllers'], function
Route::delete('locations/{location}', 'LegacyApiController@del_location')->name('del_location');
Route::delete('services/{id}', 'LegacyApiController@del_service_from_host')->name('del_service_from_host');
Route::patch('services/{id}', 'LegacyApiController@edit_service_for_host')->name('edit_service_for_host');
Route::post('bgp/{id}', 'LegacyApiController@edit_bgp_descr')->name('edit_bgp_descr');
});
// restricted by access