code: protected function doUpdate(StoreInterface $store, UpdateResource $request)
      {
          if ($response = $this->beforeCommit($request)) {
              return $response;
          }
  
          $record = $store->updateRecord(
              $request->getRecord(),
              $request->all(),
              $request->getParameters()
          );
  
          return $this->afterCommit($request, $record, true) ?: $record;
      }
docs: Update a resource.
  
  @param StoreInterface $store
  @param UpdateResource $request
  @return mixed
  the updated record, an asynchronous process, or a HTTP response.