approveById method

Future<T> approveById(
  1. num id
)

Approves an entity based on its ID.

Parameters:

  • id: The ID of the entity to approve.

Returns:

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

Implementation

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