Changing The API's

merge-requests/17/head
zaid_daoud 3 years ago
parent fe468aa254
commit b8e253e685

@ -25,6 +25,7 @@ class APIError {
}
APIException _throwAPIException(Response response) {
print(response.statusCode);
switch (response.statusCode) {
case 200:
APIError? apiError;

@ -25,6 +25,9 @@ class UserApiClient {
},
"${URLs.host1}${URLs.login}",
await user.toLoginJson(), //body
headers: {
'Content-Type': 'application/json; charset=utf-8',
},
);
}

@ -1,10 +1,10 @@
class URLs {
URLs._();
static const host2 = "http://194.163.164.213/atoms/api";
static const host1 = "https://atoms.hmg.com/api";
static const host1 = "https://atomsuat.hmg.com";
// API Routes
static const login = "/handle/user/login"; // post
static const login = "/mobile/MobileAuth/Login"; // post
static const register = "/handle/create/user"; // post
static const updateProfile = "/update/user/profile"; // post
static const getHospitals = "/handle/return/all/clients"; // get

@ -23,8 +23,8 @@ class User {
if (FirebaseNotificationManger.token == null) await FirebaseNotificationManger.getToken();
return {
"username": userName,
"pass": password,
"firebase_token": FirebaseNotificationManger.token ?? "",
"password": password,
"fireBaseToken": FirebaseNotificationManger.token ?? "",
};
}

Loading…
Cancel
Save