- Redirection vers /login après première config réussie - Gestion défensive des réponses API (200/201, bool/string) - Force l'onglet Paramètres si setup non terminé Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
382 B
Dart
15 lines
382 B
Dart
class Env {
|
|
// Base URL de l'API, surchargeable à la compilation via --dart-define=API_BASE_URL
|
|
static const String apiBaseUrl = String.fromEnvironment(
|
|
'API_BASE_URL',
|
|
defaultValue: 'https://app.ptits-pas.fr',
|
|
);
|
|
|
|
// Construit une URL vers l'API v1 à partir d'un chemin (commençant par '/')
|
|
static String apiV1(String path) => '$apiBaseUrl/api/v1$path';
|
|
}
|
|
|
|
|
|
|
|
|