API - Fixed getTransactions error crashing the whole app

This commit is contained in:
Matthew Patrick 2022-05-22 16:51:01 +07:00
parent 8d399ad2ed
commit 39988fdc15

View file

@ -63,8 +63,15 @@ Future<dynamic> getSessions(session) async {
} }
Future<dynamic> getTransactions(session) async { Future<dynamic> getTransactions(session) async {
var req = await Dio() var req = await Dio().post(
.post('$host/transaction', queryParameters: {'session_token': session}); '$host/transaction',
queryParameters: {'session_token': session},
options: Options(
validateStatus: (status) {
return status! < 500;
},
),
);
var res = req.data; var res = req.data;
return res; return res;
} }