19 lines
569 B
TypeScript
19 lines
569 B
TypeScript
|
import { Injectable } from '@angular/core';
|
||
|
import { Observable } from 'rxjs';
|
||
|
import { IUser } from '../models/user';
|
||
|
import { HttpClient } from "@angular/common/http";
|
||
|
import { AppConfig } from "../shared/app.config";
|
||
|
|
||
|
@Injectable()
|
||
|
export class UserService {
|
||
|
private _apiEndPoint: string;
|
||
|
|
||
|
constructor(public httpClient: HttpClient, public appConfig: AppConfig) {
|
||
|
this._apiEndPoint = "";//appConfig.getConfig("apiEndPoint");
|
||
|
}
|
||
|
|
||
|
getCurrentUser(): Observable<IUser> {
|
||
|
return this.httpClient.get<IUser>(`${this._apiEndPoint}/api/v1/currentuser`);
|
||
|
}
|
||
|
}
|