|
@@ -60,7 +60,7 @@ import TabBarButton from './src/components/TabBarButton';
|
|
|
import { ParamListBase, RouteProp } from '@react-navigation/native';
|
|
|
import setupDatabaseAndSync from 'src/database';
|
|
|
import { MenuDrawer } from 'src/components';
|
|
|
-import { API_URL } from 'src/constants';
|
|
|
+import { API_URL, APP_VERSION } from 'src/constants';
|
|
|
import {
|
|
|
InfoScreen,
|
|
|
PlanInfoScreen,
|
|
@@ -132,10 +132,19 @@ const Route = () => {
|
|
|
const checkNmToken = async () => {
|
|
|
if (token && uid) {
|
|
|
try {
|
|
|
- const response = await axios.postForm(API_URL + '/' + API.CHECK_TOKEN, {
|
|
|
- token,
|
|
|
- user_id: +uid
|
|
|
- });
|
|
|
+ const response = await axios.postForm(
|
|
|
+ API_URL + '/' + API.CHECK_TOKEN,
|
|
|
+ {
|
|
|
+ token,
|
|
|
+ user_id: +uid
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headers: {
|
|
|
+ Platform: Platform.OS,
|
|
|
+ 'App-Version': APP_VERSION
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
if (response.data.result !== 'OK') {
|
|
|
handleLogout();
|