From 1ad56760ced34d0ed93a7a1705e5a810ab57c29e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 16 Feb 2022 09:08:50 -0800 Subject: [PATCH] Adds delete endpoint for licenses Signed-off-by: snipe --- app/Http/Controllers/Api/LicensesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index 268248ab77..f31715348c 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -82,6 +82,10 @@ class LicensesController extends Controller $licenses = $licenses->TextSearch($request->input('search')); } + if ($request->filled('deleted')) { + $licenses->onlyTrashed(); + } + // Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which // case we override with the actual count, so we should return 0 items.