mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve some
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user