Initial commit

This commit is contained in:
2026-05-05 10:39:43 +02:00
commit b590ecdc35
87 changed files with 3934 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../environments/environment';
@Injectable({ providedIn: 'root' })
export class ApiService {
private baseUrl = environment.apiBaseUrl;
constructor(private http: HttpClient) {}
get<T>(path: string) {
return this.http.get<T>(`${this.baseUrl}${path}`);
}
post<T>(path: string, body: unknown) {
return this.http.post<T>(`${this.baseUrl}${path}`, body);
}
put<T>(path: string, body: unknown) {
return this.http.put<T>(`${this.baseUrl}${path}`, body);
}
delete<T>(path: string) {
return this.http.delete<T>(`${this.baseUrl}${path}`);
}
}
@@ -0,0 +1,4 @@
export const environment = {
production: true,
apiBaseUrl: 'http://romaric-thibault.fr:8080/api'
};
@@ -0,0 +1,4 @@
export const environment = {
production: false,
apiBaseUrl: 'http://localhost:8080/api'
};