Aplikacja_mobilna/cookbook/lib/domain/usecases/get_logged_user_usecase.dart

15 lines
442 B
Dart
Raw Normal View History

2024-02-18 14:30:02 +01:00
import 'package:cookbook/domain/entities/auth_user.dart';
import 'package:cookbook/domain/entities/failures/failure.dart';
import 'package:cookbook/domain/repo/auth_repository.dart';
import 'package:either_dart/either.dart';
class GetLoggedUserUsecase {
final AuthRepository _repository;
GetLoggedUserUsecase(this._repository);
Future<Either<Failure, AuthUser?>> execute() async {
return await _repository.getLoggedUser();
}
}