Modified Register API to take just 1 JSON object
This commit is contained in:
parent
564b70a21b
commit
63f275776d
1 changed files with 2 additions and 7 deletions
|
@ -13,15 +13,10 @@ Future<dynamic> getProduct(id) async {
|
|||
return res;
|
||||
}
|
||||
|
||||
Future<dynamic> registerPost({email, password, firstName, lastName}) async {
|
||||
Future<dynamic> registerPost(data) async {
|
||||
Response req = await Dio().post(
|
||||
(host + '/register'),
|
||||
data: {
|
||||
'email': email,
|
||||
'password': password,
|
||||
'first_name': firstName,
|
||||
'last_name': lastName
|
||||
},
|
||||
data: data,
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
validateStatus: (status) {
|
||||
|
|
Loading…
Reference in a new issue