From e91adc07fe94670b7fc6d20060b52f634a735267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Thu, 8 Jul 2021 10:48:26 +0100 Subject: [PATCH] Pipeline bug on ibm packge solved --- src/app/home/home.page.ts | 2 +- src/app/services/notifications.service.ts | 12 ++++++------ src/app/services/webnotifications.service.ts | 6 +++--- src/assets/js/index.js | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index af4ebd150..dbc8cebc6 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -105,7 +105,7 @@ export class HomePage implements OnInit { } mobilefirstConnect() { - WLAuthorizationManager.obtainAccessToken("").then( + window['WLAuthorizationManager'].obtainAccessToken("").then( (token) => { console.log('MobileFirst Server connect: Success ' + token); diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 9d7bb32a2..1d301f801 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -43,11 +43,11 @@ export class NotificationsService { const geturl = environment.apiURL + 'notifications/token'; - WLAuthorizationManager.obtainAccessToken("push.mobileclient").then( + window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { console.log('Push Notification: Success ' + token); - MFPPush.initialize( + window['MFPPush'].initialize( function (successResponse) { console.log("Push notification Successfully Service intialized: " + successResponse); }, @@ -56,7 +56,7 @@ export class NotificationsService { } ); - MFPPush.registerDevice(null, (successResponse) => { + window['MFPPush'].registerDevice(null, (successResponse) => { console.log("Successfully registered: " + JSON.stringify(successResponse)); console.log('token: ', successResponse.deviceId) this.storageService.store(username, successResponse.deviceId); @@ -92,14 +92,14 @@ export class NotificationsService { } async onReceviNotification() { - WLAuthorizationManager.obtainAccessToken("push.mobileclient").then( + window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { console.log('Push Notification: Success ' + token); - MFPPush.initialize( + window['MFPPush'].initialize( function (successResponse) { console.log("Push notification Successfully intialized: " + successResponse); - MFPPush.registerNotificationsCallback(notificationReceived); + window['MFPPush'].registerNotificationsCallback(notificationReceived); }, function (failureResponse) { console.log("Push notification failure intialized: " + failureResponse); diff --git a/src/app/services/webnotifications.service.ts b/src/app/services/webnotifications.service.ts index b3d84427b..62b85d74d 100644 --- a/src/app/services/webnotifications.service.ts +++ b/src/app/services/webnotifications.service.ts @@ -47,7 +47,7 @@ export class WebNotificationsService { } async onReceviNotificationWeb() { - WLAuthorizationManager.obtainAccessToken("push.mobileclient").then( + window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { console.log('Push Notification: Success ' + token); @@ -94,7 +94,7 @@ async onReceviNotificationWeb() { const geturl = environment.apiURL + 'notifications/token'; */ /* - WLAuthorizationManager.obtainAccessToken("push.mobileclient").then( + window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { console.log('Push Notification: Success ' + token); @@ -143,7 +143,7 @@ async onReceviNotificationWeb() { } */ /* async onReceviNotification() { - WLAuthorizationManager.obtainAccessToken("push.mobileclient").then( + window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { console.log('Push Notification: Success ' + token); diff --git a/src/assets/js/index.js b/src/assets/js/index.js index 7eade3555..d99341323 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -1,6 +1,6 @@ function wlCommonInit() { - WLAuthorizationManager.obtainAccessToken("").then( + window['WLAuthorizationManager'].obtainAccessToken("").then( (token) => { console.log('MobileFirst Server connect: Success ' + token);