approve method

Future<T> approve(
  1. T entity
)

Approves an entity based on the entity object.

Parameters:

  • entity: The entity to approve.

Returns:

  • A Future that resolves to the approved entity of type T.

Implementation

Future<T> approve(T entity) async {
  return dio
      .post(
        "/approve",
        data: entity.toJSON(),
      )
      .then(
        (response) => response.body<T>(),
      );
}