fix(mobile): URL changement mdp corrigée + v3.0 — multi-org, AppAuth, sécurité prod
Auth: - profile_repository.dart: /api/auth/change-password → /api/membres/auth/change-password Multi-org (Phase 3): - OrgSelectorPage, OrgSwitcherBloc, OrgSwitcherEntry - org_context_service.dart: headers X-Active-Organisation-Id + X-Active-Role Navigation: - MorePage: navigation conditionnelle par typeOrganisation - Suppression adaptive_navigation (remplacé par main_navigation_layout) Auth AppAuth: - keycloak_webview_auth_service: fixes AppAuth Android - AuthBloc: gestion REAUTH_REQUIS + premierLoginComplet Onboarding: - Nouveaux états: payment_method_page, onboarding_shared_widgets - SouscriptionStatusModel mis à jour StatutValidationSouscription Android: - build.gradle: ProGuard/R8, network_security_config - Gradle wrapper mis à jour
This commit is contained in:
@@ -58,26 +58,32 @@ class SouscriptionDatasource {
|
||||
required String typeFormule,
|
||||
required String plageMembres,
|
||||
required String typePeriode,
|
||||
required String typeOrganisation,
|
||||
String? typeOrganisation,
|
||||
required String organisationId,
|
||||
}) async {
|
||||
try {
|
||||
final opts = await _authOptions();
|
||||
final body = <String, dynamic>{
|
||||
'typeFormule': typeFormule,
|
||||
'plageMembres': plageMembres,
|
||||
'typePeriode': typePeriode,
|
||||
'organisationId': organisationId,
|
||||
};
|
||||
if (typeOrganisation != null && typeOrganisation.isNotEmpty) {
|
||||
body['typeOrganisation'] = typeOrganisation;
|
||||
}
|
||||
final response = await _dio.post(
|
||||
'$_base/api/souscriptions/demande',
|
||||
data: {
|
||||
'typeFormule': typeFormule,
|
||||
'plageMembres': plageMembres,
|
||||
'typePeriode': typePeriode,
|
||||
'typeOrganisation': typeOrganisation,
|
||||
'organisationId': organisationId,
|
||||
},
|
||||
data: body,
|
||||
options: opts,
|
||||
);
|
||||
if ((response.statusCode == 200 || response.statusCode == 201) && response.data is Map) {
|
||||
return SouscriptionStatusModel.fromJson(response.data as Map);
|
||||
}
|
||||
AppLogger.warning('SouscriptionDatasource.creerDemande: HTTP ${response.statusCode}');
|
||||
final errMsg = response.data is Map
|
||||
? (response.data as Map)['message'] ?? response.data.toString()
|
||||
: response.data?.toString() ?? '(vide)';
|
||||
AppLogger.warning('SouscriptionDatasource.creerDemande: HTTP ${response.statusCode} — erreur="$errMsg" — sentBody=$body');
|
||||
} catch (e) {
|
||||
AppLogger.error('SouscriptionDatasource.creerDemande: $e');
|
||||
}
|
||||
@@ -106,7 +112,8 @@ class SouscriptionDatasource {
|
||||
try {
|
||||
final opts = await _authOptions();
|
||||
final response = await _dio.post(
|
||||
'$_base/api/souscriptions/$souscriptionId/confirmer-paiement',
|
||||
'$_base/api/souscriptions/confirmer-paiement',
|
||||
queryParameters: {'id': souscriptionId},
|
||||
options: opts,
|
||||
);
|
||||
return response.statusCode == 200;
|
||||
|
||||
Reference in New Issue
Block a user