mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed wrong column and parameter used when deleting a location via API (#16109)
This commit is contained in:
@@ -3206,7 +3206,7 @@ function del_location(Illuminate\Http\Request $request)
|
|||||||
'location_id' => 0,
|
'location_id' => 0,
|
||||||
];
|
];
|
||||||
dbUpdate($data, 'devices', '`location_id` = ?', [$location_id]);
|
dbUpdate($data, 'devices', '`location_id` = ?', [$location_id]);
|
||||||
$result = dbDelete('locations', '`location` = ? ', [$location]);
|
$result = dbDelete('locations', '`id` = ? ', [$location_id]);
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
return api_success_noresult(201, "Location $location has been deleted successfully");
|
return api_success_noresult(201, "Location $location has been deleted successfully");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user