import { Injectable } from "@angular/core"; import { HttpHeaders } from "@angular/common/http/src/headers"; import { BaseHttpService } from "../http/base-http.service"; import { environment } from "../../../../environments/environment"; @Injectable() export class EmailConfirmationService { private actioUrl: string; private headers: HttpHeaders constructor(private http: BaseHttpService) { this.actioUrl = environment.Server + 'emailConfirmation/'; } public emailConfirmation(token: string) { return this.http.get(this.actioUrl + token, { headers: this.headers }); } public sendConfirmationEmail(email: string) { return this.http.post(this.actioUrl, email, {headers: this.headers}); } }