fixed comments
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
// src/api/client.ts
|
||||
import axios, { AxiosError } from 'axios'; // Import AxiosError
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import { Platform } from 'react-native';
|
||||
import * as SecureStore from 'expo-secure-store';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
|
||||
// const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://192.168.255.221:8000/api'; // Use your machine's IP
|
||||
// const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://192.168.1.9:8000/api'; // Use your machine's IP
|
||||
const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'https://maia.depaoli.id.au/api'; // Use your machine's IP
|
||||
const ACCESS_TOKEN_KEY = 'maia_access_token'; // Renamed for clarity
|
||||
const REFRESH_TOKEN_KEY = 'maia_refresh_token'; // Key for refresh token
|
||||
const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'https://maia.depaoli.id.au/api';
|
||||
const ACCESS_TOKEN_KEY = 'maia_access_token';
|
||||
const REFRESH_TOKEN_KEY = 'maia_refresh_token';
|
||||
|
||||
console.log("Using API Base URL:", API_BASE_URL);
|
||||
|
||||
@@ -34,7 +32,7 @@ const deleteToken = async (key: string): Promise<void> => {
|
||||
if (Platform.OS === 'web') {
|
||||
await AsyncStorage.removeItem(key);
|
||||
} else {
|
||||
await SecureStore.deleteItemAsync(key).catch(() => {}); // Ignore delete error
|
||||
await SecureStore.deleteItemAsync(key).catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user