28 lines
743 B
Dart
28 lines
743 B
Dart
import 'package:tm_app/data/services/model/login_response/login_response_model.dart';
|
|
|
|
import '../../core/utils/result.dart';
|
|
import '../services/auth_service.dart';
|
|
import '../services/model/logout_response/logout_response.dart';
|
|
|
|
class AuthRepository {
|
|
final AuthService _authService;
|
|
|
|
AuthRepository({required AuthService authService})
|
|
: _authService = authService;
|
|
|
|
Future<Result<LoginResponseModel>> login({
|
|
required String username,
|
|
required String password,
|
|
}) async {
|
|
return _authService.login(username: username, password: password);
|
|
}
|
|
|
|
Future<Result<LogoutResponse>> logout() async {
|
|
return _authService.logout();
|
|
}
|
|
|
|
Future<void> localLogout() async {
|
|
return _authService.localLogout();
|
|
}
|
|
}
|