mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Created add, edit, remove location and edit, remove services to the API (#11080)
* Created add, edit, remove location and edit, remove services to the v0 API and added their corresponding routes * Changed repeating code by adding a function that checks for missing parameters * Reduced the lines of add_service_for_host, modified a little more the missing fields function * Changed True and False to true and false, erased an unused var called $missing * Solved merged confict Deleted duplicate functions generated when solving merge conflicts * fixed more conficts Deleting duplicate entries produced by trying to solve a merge conflict * fixing more duplicate functions This merge conflict created more duplicates * Update api_functions.inc.php * Update api_functions.inc.php
This commit is contained in:
@@ -78,6 +78,11 @@ Route::group(['prefix' => 'v0', 'namespace' => '\App\Api\Controllers'], function
|
||||
Route::post('devicegroups', 'LegacyApiController@add_device_group')->name('add_device_group');
|
||||
Route::post('devices/{id}/parents', 'LegacyApiController@add_parents_to_host')->name('add_parents_to_host');
|
||||
Route::delete('/devices/{id}/parents', 'LegacyApiController@del_parents_from_host')->name('del_parents_from_host');
|
||||
Route::post('locations', 'LegacyApiController@add_location')->name('add_location');
|
||||
Route::patch('locations/{location_id_or_name}', 'LegacyApiController@edit_location')->name('edit_location');
|
||||
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');
|
||||
});
|
||||
|
||||
// restricted by access
|
||||
|
Reference in New Issue
Block a user