21 lines
599 B
Dart
21 lines
599 B
Dart
/// Use Case: Récupérer le profil du membre connecté
|
|
library get_profile;
|
|
|
|
import 'package:injectable/injectable.dart';
|
|
import '../../../members/data/models/membre_complete_model.dart';
|
|
import '../repositories/profile_repository.dart';
|
|
|
|
/// Récupère le profil du membre connecté via l'endpoint /api/membres/me
|
|
@injectable
|
|
class GetProfile {
|
|
final IProfileRepository _repository;
|
|
|
|
GetProfile(this._repository);
|
|
|
|
/// Exécute le use case
|
|
/// Retourne le profil du membre connecté ou null si non trouvé
|
|
Future<MembreCompletModel?> call() async {
|
|
return _repository.getMe();
|
|
}
|
|
}
|