Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
refactor(version & fetch): done update version lib & build base repos…
Browse files Browse the repository at this point in the history
…itory
  • Loading branch information
lambiengcode committed Sep 27, 2021
1 parent c4a6e37 commit 2131aa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/repository/base_repository.dart
Expand Up @@ -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<String, String> paramsObject = {};
if (params != null)
Expand Down
4 changes: 2 additions & 2 deletions lib/src/repository/remote/authentication_repository.dart
Expand Up @@ -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"];
}
Expand All @@ -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<String, dynamic>.from(
jsonDecode(response.body)["data"],
Expand Down

0 comments on commit 2131aa4

Please sign in to comment.