This commit is contained in:
Peter Maquiran
2021-08-25 11:51:02 +01:00
parent f469fa0588
commit 40667918ff
6 changed files with 41 additions and 10 deletions
+19 -1
View File
@@ -23,6 +23,11 @@ export class NotificationsService {
folderId: string;
DataArray: Array<String> = [];
callbacks: {
type: string,
funx: Function
}[] = []
constructor(
private http: HttpClient,
private storageService: StorageService,
@@ -34,7 +39,20 @@ export class NotificationsService {
private toastService: ToastService,
private zone: NgZone,
private activeroute: ActivatedRoute,
private jsonstore: JsonStore) { }
private jsonstore: JsonStore) {
this.callbacks.forEach(e=> {
if(e.type = 'Create Depacho') {
e.funx()
}
})
}
registerCallback(type: string, funx: Function ) {
this.callbacks.push({type, funx})
}
getTokenByUserIdAndId(user, userID) {
const geturl = environment.apiURL + 'notifications/user/' + userID;