change_in_ip

parent 47d33bbc
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false" android:allowBackup="false"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
......
...@@ -67,7 +67,7 @@ const HealthFormExercise = (props) => { ...@@ -67,7 +67,7 @@ const HealthFormExercise = (props) => {
userData.riskLevel = respond.data.prediction; userData.riskLevel = respond.data.prediction;
userData.risk_level_status = predictionStatus; userData.risk_level_status = predictionStatus;
userData.is_exercises_active = true; userData.is_exercises_active = true;
ToastAndroid.show(`You at ${respond.data.prediction}`, ToastAndroid.SHORT);
let responds = await addInitialExercises(userData._id, prediction); let responds = await addInitialExercises(userData._id, prediction);
if (responds.data) { if (responds.data) {
try { try {
......
import axios from 'axios'; 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'; import AsyncStorage from '@react-native-async-storage/async-storage';
//signIn API Call //signIn API Call
......
import axios from "axios"; import axios from "axios";
let BASE_PATH = 'http://16.170.242.186:8080'; 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'; import AsyncStorage from '@react-native-async-storage/async-storage';
...@@ -23,7 +23,7 @@ export let meternalHealthPredict = async (Age,SystolicBP, DiastolicBP, Blood_glu ...@@ -23,7 +23,7 @@ export let meternalHealthPredict = async (Age,SystolicBP, DiastolicBP, Blood_glu
export let addInitialExercises = async (id, riskLevel) => { export let addInitialExercises = async (id, riskLevel) => {
try { try {
let value = await axios.post(BASE_PATH2 + '/initial_exercises', { let value = await axios.post(SECOND_BASE_PATH + '/initial_exercises', {
_id: id, _id: id,
riskLevel: riskLevel riskLevel: riskLevel
}) })
...@@ -37,7 +37,7 @@ export let addInitialExercises = async (id, riskLevel) => { ...@@ -37,7 +37,7 @@ export let addInitialExercises = async (id, riskLevel) => {
export let getAllExerciseDay = async (id, dateNum) => { export let getAllExerciseDay = async (id, dateNum) => {
try { try {
console.log("id", id) 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, _id: id,
day: dateNum day: dateNum
}) })
...@@ -49,7 +49,7 @@ export let getAllExerciseDay = async (id, dateNum) => { ...@@ -49,7 +49,7 @@ export let getAllExerciseDay = async (id, dateNum) => {
export let updateDeviceStatus = async (id, deviceStatus) => { export let updateDeviceStatus = async (id, deviceStatus) => {
try { try {
let value = await axios.post(BASE_PATH2 + '/update_device_status', { let value = await axios.post(SECOND_BASE_PATH + '/update_device_status', {
_id: id, _id: id,
deviceStatus: deviceStatus 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