changed api endpoint

This commit is contained in:
Marcus Ferl 2023-07-26 12:44:37 +02:00
parent 688983df92
commit b6293da0fe

View File

@ -9,17 +9,17 @@ import { DatePipe } from '@angular/common';
}) })
export class UsersService { export class UsersService {
private apiEndpoint: string = "https://weiferl-web.azurewebsites.net/api/"
constructor(private http: HttpClient, private datePipe: DatePipe) { constructor(private http: HttpClient, private datePipe: DatePipe) {
} }
loadAllUsers(): Observable<User[]> { loadAllUsers(): Observable<User[]> {
return this.http.get<User[]>('https://weiferl-web.azurewebsites.net/api/getAllUsers'); return this.http.get<User[]>(this.apiEndpoint + 'getAllUsers');
} }
addNewUser(user: User) { addNewUser(user: User) {
return this.http.post('https://weiferl-web.azurewebsites.net/api/addUser', user); return this.http.post(this.apiEndpoint + 'addUser', user);
} }
formatDates(users: User[]): User[] { formatDates(users: User[]): User[] {
return users.map(user => { return users.map(user => {