Modified Register API to take just 1 JSON object

This commit is contained in:
Matthew Patrick 2022-04-27 01:13:53 +07:00
parent 564b70a21b
commit 63f275776d

View file

@ -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) {