diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 4fb35872a0..671c8aafee 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -707,11 +707,11 @@ class UsersController extends Controller $logaction->user_id = Auth::user()->id; $logaction->logaction('restore'); - return response()->json(Helper::formatStandardApiResponse('success', trans('admin/users/message.restore.success')), 200); + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.success.restored')), 200); } // Check validation to make sure we're not restoring a user with the same username as an existing user - return response()->json(Helper::formatStandardApiResponse('error', trans('general.could_not_restore', ['item_type' => trans('general.user'), 'error' => $user->getErrors()->first()])), 200); + return response()->json(Helper::formatStandardApiResponse('error', null, $user->getErrors())); } return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.user_not_found')), 200);