import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { environment } from 'src/environments/environment'; import { Token } from '../models/token.model'; @Injectable({ providedIn: 'root' }) export class NotificationsService { constructor(private http: HttpClient,) { } getTokenByUserIdAndId(user, userID) { const geturl = environment.apiURL + 'notifications/user/' + userID; return this.http.get(`${geturl}`); } postToken(userId, token) { const geturl = environment.apiURL + 'notifications/token'; let data = { UserId: userId, TokenId: token, Status: 1, Service: 2 } return this.http.post(`${geturl}`,data); } }