FarmMapsLib/projects/common/src/lib/services/user.service.ts
Willem Dantuma ff30ad1cbe
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
Replace resumablejs with ngx-uploadx
2019-07-18 18:59:42 +02:00

20 lines
547 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 {
constructor(public httpClient: HttpClient, public appConfig: AppConfig) {
}
ApiEndpoint() {
return this.appConfig.getConfig("apiEndPoint");
}
getCurrentUser(): Observable<IUser> {
return this.httpClient.get<IUser>(`${this.ApiEndpoint()}/api/v1/currentuser`);
}
}