reject method
Rejects an entity based on the entity object.
Parameters:
entity
: The entity to reject.
Returns:
- A Future that resolves to the rejected entity of type
T
.
Implementation
Future<T> reject(T entity) async {
return dio
.post(
"/reject",
data: entity.toJSON(),
)
.then(
(response) => response.body<T>(),
);
}