Initial push to my private server
This commit is contained in:
@@ -86,15 +86,28 @@ class OtpVerificationController extends GetxController {
|
||||
},
|
||||
);
|
||||
|
||||
if (response != 'failure' && response['status'] == 'success') {
|
||||
if (response != 'failure') {
|
||||
Get.back(); // توجه إلى الصفحة التالية
|
||||
Get.put(FirebaseMessagesController()).sendNotificationToDriverMAP(
|
||||
await CRUD().post(
|
||||
link:
|
||||
'${AppLink.seferPaymentServer}/auth/token/update_driver_auth.php',
|
||||
payload: {
|
||||
'token': box.read(BoxName.tokenDriver).toString(),
|
||||
'fingerPrint': finger.toString(),
|
||||
'captain_id': box.read(BoxName.driverID).toString(),
|
||||
});
|
||||
final fcm = Get.isRegistered<FirebaseMessagesController>()
|
||||
? Get.find<FirebaseMessagesController>()
|
||||
: Get.put(FirebaseMessagesController());
|
||||
|
||||
await fcm.sendNotificationToDriverMAP(
|
||||
'token change',
|
||||
'change device'.tr,
|
||||
ptoken.toString(),
|
||||
[],
|
||||
'cancel.wav',
|
||||
);
|
||||
|
||||
Get.offAll(() => HomeCaptain());
|
||||
} else {
|
||||
Get.snackbar('Verification Failed', 'OTP is incorrect or expired');
|
||||
|
||||
Reference in New Issue
Block a user