2019-09-23 10:17:03 +02:00
|
|
|
import { HttpHeaders } from '@angular/common/http';
|
2019-07-12 16:12:16 +02:00
|
|
|
import { Injectable } from "@angular/core";
|
|
|
|
import { environment } from "../../../../environments/environment";
|
2019-09-23 10:17:03 +02:00
|
|
|
import { BaseHttpService } from "../http/base-http.service";
|
2019-07-12 16:12:16 +02:00
|
|
|
|
|
|
|
@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<String>(this.actioUrl + token, { headers: this.headers });
|
|
|
|
}
|
|
|
|
|
|
|
|
public sendConfirmationEmail(email: string) {
|
2019-09-23 10:17:03 +02:00
|
|
|
return this.http.post<String>(this.actioUrl, email, { headers: this.headers });
|
2019-07-12 16:12:16 +02:00
|
|
|
}
|
|
|
|
}
|