feat: Intégration du frontend Flutter depuis YNOV
- Framework: Flutter web - Pages: Login, inscription, dashboards - Services: API client, authentification, gestion d'état - Intégration avec backend NestJS - Dockerfile pour déploiement web
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
class ApiConfig {
|
||||
// static const String baseUrl = 'http://localhost:3000/api/v1/';
|
||||
static const String baseUrl = 'https://ynov.ptits-pas.fr/api/v1';
|
||||
|
||||
// Auth endpoints
|
||||
static const String login = '/auth/login';
|
||||
static const String register = '/auth/register';
|
||||
static const String refreshToken = '/auth/refresh';
|
||||
|
||||
// Users endpoints
|
||||
static const String users = '/users';
|
||||
static const String userProfile = '/users/profile';
|
||||
static const String userChildren = '/users/children';
|
||||
|
||||
// Dashboard endpoints
|
||||
static const String dashboard = '/dashboard';
|
||||
static const String events = '/events';
|
||||
static const String contracts = '/contracts';
|
||||
static const String conversations = '/conversations';
|
||||
static const String notifications = '/notifications';
|
||||
|
||||
// Headers
|
||||
static Map<String, String> get headers => {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
};
|
||||
|
||||
static Map<String, String> authHeaders(String token) => {
|
||||
...headers,
|
||||
'Authorization': 'Bearer $token',
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user