8-15/4
This commit is contained in:
@@ -69,7 +69,7 @@ class RegisterController extends GetxController {
|
|||||||
|
|
||||||
void register() async {
|
void register() async {
|
||||||
if (formKey.currentState!.validate()) {
|
if (formKey.currentState!.validate()) {
|
||||||
await CRUD().post(link: AppLink.signUp, payload: {
|
var res = await CRUD().post(link: AppLink.signUp, payload: {
|
||||||
'first_name': firstNameController.text,
|
'first_name': firstNameController.text,
|
||||||
'last_name': lastNameController.text,
|
'last_name': lastNameController.text,
|
||||||
'email': emailController.text,
|
'email': emailController.text,
|
||||||
@@ -78,13 +78,17 @@ class RegisterController extends GetxController {
|
|||||||
'gender': gender,
|
'gender': gender,
|
||||||
'site': siteController.text,
|
'site': siteController.text,
|
||||||
'birthdate': birthDate,
|
'birthdate': birthDate,
|
||||||
}).then((value) => print(value));
|
});
|
||||||
|
print(jsonDecode(res));
|
||||||
|
if (jsonDecode(res)['status'] == 'success') {
|
||||||
|
print('sdfffffffffff');
|
||||||
|
int randomNumber = Random().nextInt(100000) + 1;
|
||||||
|
await CRUD().post(link: AppLink.sendVerifyEmail, payload: {
|
||||||
|
'email': emailController.text,
|
||||||
|
'token': randomNumber.toString(),
|
||||||
|
}).then((value) => print(value));
|
||||||
|
Get.to(() => const VerifyEmailPage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int randomNumber = Random().nextInt(100000) + 1;
|
|
||||||
await CRUD().post(link: AppLink.sendVerifyEmail, payload: {
|
|
||||||
'email': emailController.text,
|
|
||||||
'token': randomNumber.toString(),
|
|
||||||
}).then((value) => print(value));
|
|
||||||
Get.to(() => const VerifyEmailPage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// print("--------------" + response.body.toString());
|
// print("-----/---------" + response.body.toString());
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
@@ -49,6 +49,7 @@ class CRUD {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.request);
|
print(response.request);
|
||||||
|
print(payload);
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
|
|||||||
Reference in New Issue
Block a user