API - Fixed getTransactions error crashing the whole app
This commit is contained in:
parent
8d399ad2ed
commit
39988fdc15
1 changed files with 9 additions and 2 deletions
|
@ -63,8 +63,15 @@ Future<dynamic> getSessions(session) async {
|
|||
}
|
||||
|
||||
Future<dynamic> getTransactions(session) async {
|
||||
var req = await Dio()
|
||||
.post('$host/transaction', queryParameters: {'session_token': session});
|
||||
var req = await Dio().post(
|
||||
'$host/transaction',
|
||||
queryParameters: {'session_token': session},
|
||||
options: Options(
|
||||
validateStatus: (status) {
|
||||
return status! < 500;
|
||||
},
|
||||
),
|
||||
);
|
||||
var res = req.data;
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue