mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve monitoring the solution
This commit is contained in:
@@ -124,10 +124,9 @@ export class NotificationsService {
|
||||
if (this.platform.is('ios')) {
|
||||
FCM.getToken()
|
||||
.then(r => {
|
||||
tracing.setAttribute('notification.token', 'true')
|
||||
this.postToken(r.token, geturl, tracing)
|
||||
this.token = r.token
|
||||
tracing.setAttribute('notification.token', 'true')
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
// alert(this.token)
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -139,9 +138,10 @@ export class NotificationsService {
|
||||
|
||||
PushNotifications.addListener('registration',
|
||||
(token: Token) => {
|
||||
|
||||
tracing.setAttribute('notification.token', 'true')
|
||||
this.postToken(token.value, geturl, tracing)
|
||||
this.token = token.value
|
||||
tracing.setAttribute('notification.token', 'true')
|
||||
|
||||
}
|
||||
);
|
||||
@@ -157,13 +157,11 @@ export class NotificationsService {
|
||||
this.token = token
|
||||
tracing.setAttribute('notification.token', 'true')
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
tracing.finish()
|
||||
},
|
||||
(error) => {
|
||||
console.error('Permission denied:', error);
|
||||
tracing.setAttribute('notification.token', 'false')
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.finish()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user