fix: align Flutter API repositories with backend routes (Fase 3 prep)
- api_service_repository: use correct endpoints (/services/me, /services/professional,
/professional/requests, /professional/history, /professional/calendar)
instead of broken /services?userId= query params
- api_service_repository: fix status string↔enum, createService DTO,
paginated {data,meta} response, stub setProfessionalScored/setUserScored,
extract professionalId from nested professionals.user_id
- api_score_repository: fix /comments/user/:id and /comments/professional/:id
- api_professional_repository + api_user_repository: handle paginated response
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
af91e0ba04
commit
7fb0615169
+3
-2
@@ -198,8 +198,9 @@ class ApiProfessionalRepository {
|
||||
|
||||
Future<List<ProfessionalEntity>> getProfessionalInfo() async {
|
||||
try {
|
||||
final data = await _get('/professionals') as List;
|
||||
return data.map((e) => _fromApi(e as Map<String, dynamic>)).toList();
|
||||
final body = await _get('/professionals');
|
||||
final List raw = body is Map ? (body['data'] as List? ?? []) : (body as List? ?? []);
|
||||
return raw.map((e) => _fromApi(e as Map<String, dynamic>)).toList();
|
||||
} catch (_) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user