Improve some

This commit is contained in:
Peter Maquiran
2021-07-08 10:43:40 +01:00
parent 2620dcd990
commit a61f953cdc
9 changed files with 21 additions and 18 deletions
+6 -5
View File
@@ -1,5 +1,5 @@
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
import { Injectable, NgZone } from '@angular/core';
import { Inject, Injectable, NgZone } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { StorageService } from 'src/app/services/storage.service';
@@ -8,6 +8,7 @@ import { Token } from '../models/token.model';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras,Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { Optional } from '@angular/core';
@Injectable({
providedIn: 'root'
@@ -18,13 +19,13 @@ export class NotificationsService {
folderId: string;
constructor(
private http: HttpClient,
private http: HttpClient,
private storageService: StorageService,
private modalController: ModalController,
public modalCtrl: AlertController,
private animationController: AnimationController,
private platform: Platform,
private router: Router,
private router: Router,
private toastService: ToastService,
private zone: NgZone) { }
@@ -41,7 +42,7 @@ 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);
@@ -90,7 +91,7 @@ export class NotificationsService {
}
async onReceviNotification() {
WLAuthorizationManager.obtainAccessToken("push.mobileclient").then(
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => {
console.log('Push Notification: Success ' + token);