Fix local dev config and ALOTTTT OFF FLUTTER, im tired boss..
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import '../../../../core/api_service.dart';
|
||||
import '../../../../core/network/api_client.dart';
|
||||
import 'auth_model.dart';
|
||||
|
||||
abstract class AuthRemoteDataSource {
|
||||
@@ -7,14 +7,14 @@ abstract class AuthRemoteDataSource {
|
||||
}
|
||||
|
||||
class AuthRemoteDataSourceImpl implements AuthRemoteDataSource {
|
||||
final ApiService apiService;
|
||||
final ApiClient apiClient;
|
||||
|
||||
AuthRemoteDataSourceImpl(this.apiService);
|
||||
AuthRemoteDataSourceImpl(this.apiClient);
|
||||
|
||||
@override
|
||||
Future<AuthModel> login(String email, String password) async {
|
||||
try {
|
||||
final response = await apiService.post('/auth/login', {
|
||||
final response = await apiClient.dio.post('/auth/login', data: {
|
||||
'email': email,
|
||||
'password': password,
|
||||
});
|
||||
@@ -30,4 +30,4 @@ class AuthRemoteDataSourceImpl implements AuthRemoteDataSource {
|
||||
throw Exception(e.response?.data['message'] ?? 'Terjadi kesalahan jaringan');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user