diff --git a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php index 35dcbdb1d..95ebd8846 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php @@ -39,8 +39,6 @@ class SessionController extends Controller $this->customerRepository = $customerRepository; - $this->updatedCustomer = $customerRepository; - } /** @@ -114,11 +112,11 @@ class SessionController extends Controller $data['password'] = bcrypt($data['password']); } - $this->updatedCustomer->update($data, $customer->id); + $updatedCustomer = $this->customerRepository->update($data, $customer->id); return response()->json([ 'message' => 'Your account has been updated successfully.', - 'data' => new CustomerResource($this->updatedCustomer->find($customer->id)), + 'data' => new CustomerResource($updatedCustomer), ]); }