A free open source IT asset/license management system
Added parent ID to location API
snipe7a6fdc4e0a40
diff --git a/app/Http/Controllers/Api/LocationsController.php b/app/Http/Controllers/Api/LocationsController.phpindex 1ce3bf560f..3038cfcf0b 100644--- a/app/Http/Controllers/Api/LocationsController.php+++ b/app/Http/Controllers/Api/LocationsController.php@@ -137,6 +137,10 @@ class LocationsController extends Controller$locations->where('locations.company_id', '=', $request->input('company_id'));}+ if ($request->filled('parent_id')) {+ $locations->where('locations.parent_id', '=', $request->input('parent_id'));+ }+if ($request->input('status') == 'deleted') {$locations->onlyTrashed();}