Huffle b8ffa6f894
All checks were successful
Backend Build and Test / build (push) Successful in 2m13s
Add recreate task button
2025-06-26 09:03:29 +02:00

17 lines
491 B
TypeScript

import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { History } from '../models/history';
@Injectable({
providedIn: 'root'
})
export class HistoryService {
private url = 'http://localhost:8080/api';
constructor(private http: HttpClient) {}
getHistoryList(userId: number): Observable<Array<History>> {
return this.http.get<History[]>(`${this.url}/user/${userId}/history`);
}
}