From e62be59e890ec298912f4b6d021527f0a01e9540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Wed, 13 Oct 2021 08:38:11 +0100 Subject: [PATCH] On login method getToken added to else --- config.xml | 2 +- src/app/pages/login/login.page.ts | 1 + src/app/services/notifications.service.ts | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 2e850bb20..7cb062033 100644 --- a/config.xml +++ b/config.xml @@ -3,7 +3,7 @@ gabinete digital An awesome Ionic/Cordova app. Ionic Framework Team - + diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 3ff16263e..e83bae32f 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -108,6 +108,7 @@ export class LoginPage implements OnInit { this.changeProfileService.run() await this.authService.loginChat(this.userattempt); + this.getToken(); this.router.navigate(['/pin']); } diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 96ecd49dc..6ef45c88c 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -108,7 +108,9 @@ export class NotificationsService { window['MFPPush'].registerDevice(null, async (successResponse) => { console.log("Successfully registered: " + JSON.stringify(successResponse)); console.log('token: ', successResponse.deviceId) - await this.storageService.store(username, successResponse.deviceId); + await this.storageService.store(username, successResponse.deviceId).then((tokennoti) => { + console.log('token store',tokennoti) + }); await this.storageService.get(username).then(value => { console.log('STORAGE TOKEN', value) this.storageService.get(AuthConnstants.USER).then(res => {