22 lines
617 B
TypeScript
22 lines
617 B
TypeScript
import { Injectable } from '@angular/core';
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
import { BehaviorSubject, Observable, of } from 'rxjs';
|
|
import { catchError } from 'rxjs/operators';
|
|
import { environment } from '../../../environments/environment';
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AuthService {
|
|
private apiUrl = environment.apiEndpoint;
|
|
constructor(private _http: HttpClient) { }
|
|
|
|
|
|
getLoginToken(params:any): Observable<any> {
|
|
console.log(params.email)
|
|
return this._http.post<any>(this.apiUrl + "loginapp",{'email':params.email,'password':params.password})
|
|
|
|
}
|
|
}
|