From cddae4869fcce2e4d2de3b313c5e929d4efac5ae Mon Sep 17 00:00:00 2001 From: lukasfehling <6AQmxBp2VWLzo3.LXH*ApJbbje8GYaqq> Date: Tue, 31 Jan 2023 18:27:25 +0100 Subject: [PATCH] fixed the endpoint for user notification with all their assigned assets --- app/Http/Controllers/Api/UsersController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index cca829c23..9a9135a38 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -542,9 +542,10 @@ class UsersController extends Controller if (empty($user->email)) { return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.inventorynotification.error'))); } + + $user->notify((new CurrentInventory($user))); - return response()->Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success')); - + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success'))); } /**