import { Component, Inject, Injectable } from '@angular/core';
import { HttpHeaders, HttpClient } from '@angular/common/http';
import { map } from 'rxjs/operators';
import { environment } from '../../environments/environment';
const httpOptions = {
  headers: new HttpHeaders({
    'Content-Type': 'application/json'
  })
};

@Injectable({
  providedIn: 'root'
})
export class ResetpasswordService {
  baseUrl: string;
  constructor(private http: HttpClient) { }

  resetpassword(password: string, emailid: string) {
    this.baseUrl = environment.serviceUrl;
    let header = new HttpHeaders();
    header = header.set('Content-Type', 'application/json; charset=utf-8');
    return this.http.post(this.baseUrl + 'api/UserApi/resetpassword', { password, emailid }, { headers: header, observe: 'response' });
  }
}
