Fix getsessions api bug
This commit is contained in:
parent
b661d9cfd2
commit
1ecee0c007
1 changed files with 9 additions and 2 deletions
|
@ -71,8 +71,15 @@ Future<dynamic> resetPost(data) async {
|
|||
}
|
||||
|
||||
Future<dynamic> getSessions(session) async {
|
||||
var req = await Dio()
|
||||
.post('$host/sessions', queryParameters: {'session_token': session});
|
||||
var req = await Dio().post(
|
||||
'$host/sessions',
|
||||
queryParameters: {'session_token': session},
|
||||
options: Options(
|
||||
validateStatus: (status) {
|
||||
return status! < 500;
|
||||
},
|
||||
),
|
||||
);
|
||||
return {'statusCode': req.statusCode, 'data': req.data};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue