update method

  1. @override
FutureOr<Response> update(
  1. EntityModel entity
)
inherited

The update method updates an existing entity.

Implementation

@override
FutureOr<Response> update(EntityModel entity) async {
  return executeFuture(
    future: () async {
      return await dio.post(
        updatePath,
        data: entityName == 'User'
            ? {entityName: entity.toMap()}
            : {
                entityName: [entity.toMap()],
                "apiOperation": "UPDATE",
              },
      );
    },
  );
}