Update login API
This commit is contained in:
parent
5f9de35fa2
commit
5cd0787a4b
1 changed files with 3 additions and 6 deletions
|
@ -27,13 +27,10 @@ Future<dynamic> registerPost(data) async {
|
||||||
return req.statusCode;
|
return req.statusCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> loginPost({email, password}) async {
|
Future<dynamic> loginPost(data) async {
|
||||||
Response req = await Dio().post(
|
Response req = await Dio().post(
|
||||||
('$host/login'),
|
('$host/login'),
|
||||||
data: {
|
data: data,
|
||||||
'email': email,
|
|
||||||
'password': password,
|
|
||||||
},
|
|
||||||
options: Options(
|
options: Options(
|
||||||
contentType: Headers.formUrlEncodedContentType,
|
contentType: Headers.formUrlEncodedContentType,
|
||||||
validateStatus: (status) {
|
validateStatus: (status) {
|
||||||
|
@ -41,7 +38,7 @@ Future<dynamic> loginPost({email, password}) async {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
return req.statusCode;
|
return {'statusCode': req.statusCode, 'data': req.data};
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> getSessions() async {
|
Future<dynamic> getSessions() async {
|
||||||
|
|
Loading…
Reference in a new issue