forked from eatvio/eatvio_app
26 lines
633 B
Dart
26 lines
633 B
Dart
import 'package:eatvio_app/features/auth/models/credentials_model.dart';
|
|
import 'package:eatvio_app/features/auth/models/token_model.dart';
|
|
import 'package:eatvio_app/features/auth/services/auth_service.dart';
|
|
|
|
class AuthRepository {
|
|
final AuthService authService;
|
|
|
|
AuthRepository({required this.authService});
|
|
|
|
Future<TokenModel> getTokenByCredentials(
|
|
String email,
|
|
String password,
|
|
) async {
|
|
try {
|
|
return await authService.getTokenByCredentials(
|
|
credentials: CredentialsModel(
|
|
email: email,
|
|
password: password,
|
|
),
|
|
);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
}
|