approveApplication method
Future<Response?>
approveApplication({
- required String? applicationId,
- String? reviewDescription,
- GeneralCallback<
Response> ? callback,
Implementation
Future<Response<dynamic>?> approveApplication({
required String? applicationId,
String? reviewDescription,
GeneralCallback<Response<dynamic>>? callback,
}) async {
try {
final Response<dynamic> response = await dio.put(
'/application/$applicationId/approve',
data: <String, String>{
'description': reviewDescription ?? '',
},
);
if (callback != null) {
callback.onSuccess(response);
}
return response;
} on DioException catch (dioException) {
if (callback == null) {
rethrow;
} else {
handleCrudError(dioException, callback);
}
}
return null;
}