Fix getsessions api bug

This commit is contained in:
Moe Poi ~ 2022-05-23 01:17:40 +07:00
parent b661d9cfd2
commit 1ecee0c007

View file

@ -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};
}