feat: Ajout d'une tâche

This commit is contained in:
2026-09-22 20:32:14 +02:00
parent f2ad1ed735
commit a03322b52d
7 changed files with 80 additions and 10 deletions
+8 -2
View File
@@ -5,7 +5,13 @@ import { Observable } from 'rxjs';
@Service()
export class BaseService {
private readonly http: HttpClient = inject(HttpClient);
protected get<T>(url: string):Observable<T> {
return this.http.get<T>(url);
private readonly baseAddress: string = "http://127.0.0.1:8080/";
protected get<T>(url: string): Observable<T> {
return this.http.get<T>(this.baseAddress + url);
}
protected post<T>(url: string, body: T): Observable<T> {
return this.http.post<T>(this.baseAddress + url, body);
}
}