diff --git a/lib/src/repository/base_repository.dart b/lib/src/repository/base_repository.dart index 6873db6..b9c2d99 100644 --- a/lib/src/repository/base_repository.dart +++ b/lib/src/repository/base_repository.dart @@ -5,7 +5,7 @@ import 'package:http/http.dart' as http; const root_url = "domain_api.com"; const socket_url = "domain_api.com"; -class HandleApis { +class BaseRepository { get(String name, [String params]) async { Map paramsObject = {}; if (params != null) diff --git a/lib/src/repository/remote/authentication_repository.dart b/lib/src/repository/remote/authentication_repository.dart index ec966c0..8f6c08f 100644 --- a/lib/src/repository/remote/authentication_repository.dart +++ b/lib/src/repository/remote/authentication_repository.dart @@ -9,7 +9,7 @@ class AuthenticationRepository { "phone": username, "password": password, }; - var response = await HandleApis().post(ApiGateway.LOGIN, body); + var response = await BaseRepository().post(ApiGateway.LOGIN, body); if (response.statusCode == 200) { return jsonDecode(response.body)["data"]; } @@ -27,7 +27,7 @@ class AuthenticationRepository { "fullName": fullName, }; - var response = await HandleApis().post(ApiGateway.REGISTER, body); + var response = await BaseRepository().post(ApiGateway.REGISTER, body); if (response.statusCode == 200) { return Map.from( jsonDecode(response.body)["data"],