change_in_ip

parent 47d33bbc
......@@ -14,7 +14,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
......
......@@ -67,13 +67,13 @@ const HealthFormExercise = (props) => {
userData.riskLevel = respond.data.prediction;
userData.risk_level_status = predictionStatus;
userData.is_exercises_active = true;
ToastAndroid.show(`You at ${respond.data.prediction}`, ToastAndroid.SHORT);
let responds = await addInitialExercises(userData._id, prediction);
if (responds.data) {
try {
await AsyncStorage.setItem('userData', JSON.stringify(userData));
navigation.navigate(ROUTES.EXERCISE_MAIN_MENU);
ToastAndroid.show('userData updated successfully !', ToastAndroid.SHORT);
ToastAndroid.show('userData updated successfully !', ToastAndroid.SHORT);
} catch (error) {
ToastAndroid.show('Error updating userData !', ToastAndroid.SHORT);
}
......
import axios from 'axios';
const BASE_PATH = 'http://16.171.16.144/api/mother';
const BASE_PATH = 'http://16.171.16.144:8070/api/mother';
import AsyncStorage from '@react-native-async-storage/async-storage';
//signIn API Call
......
import axios from "axios";
let BASE_PATH = 'http://16.170.242.186:8080';
let BASE_PATH2 = 'http://16.171.16.144/api/mother';
let SECOND_BASE_PATH = 'http://16.171.16.144:8070/api/mother';
import AsyncStorage from '@react-native-async-storage/async-storage';
......@@ -23,7 +23,7 @@ export let meternalHealthPredict = async (Age,SystolicBP, DiastolicBP, Blood_glu
export let addInitialExercises = async (id, riskLevel) => {
try {
let value = await axios.post(BASE_PATH2 + '/initial_exercises', {
let value = await axios.post(SECOND_BASE_PATH + '/initial_exercises', {
_id: id,
riskLevel: riskLevel
})
......@@ -37,7 +37,7 @@ export let addInitialExercises = async (id, riskLevel) => {
export let getAllExerciseDay = async (id, dateNum) => {
try {
console.log("id", id)
let value = await axios.post(BASE_PATH2 + '/get_all_exercise_day', {
let value = await axios.post(SECOND_BASE_PATH + '/get_all_exercise_day', {
_id: id,
day: dateNum
})
......@@ -49,7 +49,7 @@ export let getAllExerciseDay = async (id, dateNum) => {
export let updateDeviceStatus = async (id, deviceStatus) => {
try {
let value = await axios.post(BASE_PATH2 + '/update_device_status', {
let value = await axios.post(SECOND_BASE_PATH + '/update_device_status', {
_id: id,
deviceStatus: deviceStatus
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment