This commit is contained in:
efrilm
2025-09-18 07:16:56 +07:00
parent b20854f329
commit 3b26b19b25
17 changed files with 1672 additions and 0 deletions
@@ -135,4 +135,28 @@ class AuthRepository implements IAuthRepository {
return left(const AuthFailure.unexpectedError());
}
}
@override
Future<Either<AuthFailure, Resend>> resend({
required String phoneNumber,
required String purpose,
}) async {
try {
final result = await _remoteDataProvider.resend(
phoneNumber: phoneNumber,
purpose: purpose,
);
if (result.hasError) {
return left(result.error!);
}
final auth = result.data!.toDomain();
return right(auth);
} catch (e, s) {
log('resendError', name: _logName, error: e, stackTrace: s);
return left(const AuthFailure.unexpectedError());
}
}
}