chore: build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import apiClient from "./client";
|
||||
import apiClient, { API_BASE_URL } from "./client";
|
||||
import type {
|
||||
AuthResponse,
|
||||
ClientResponse,
|
||||
@@ -9,9 +9,9 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const V2 = "https://mln-uber.club/api/v2";
|
||||
const CABINE_URL = "https://mln-uber.club/api/v1/cabine";
|
||||
const V1_PUBLIC = "https://mln-uber.club/api/v1";
|
||||
const V2 = `${API_BASE_URL}/api/v2`;
|
||||
const CABINE_URL = `${API_BASE_URL}/api/v1/cabine`;
|
||||
const V1_PUBLIC = `${API_BASE_URL}/api/v1`;
|
||||
|
||||
export const loginAdmin = async (
|
||||
username: string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import apiClient from "./client";
|
||||
import apiClient, { API_BASE_URL } from "./client";
|
||||
import type {
|
||||
OrderItem,
|
||||
DeliveryPerson,
|
||||
@@ -6,8 +6,8 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const API = "https://mln-uber.club/api/v1/cabine";
|
||||
const V2 = "https://mln-uber.club/api/v2";
|
||||
const API = `${API_BASE_URL}/api/v1/cabine`;
|
||||
const V2 = `${API_BASE_URL}/api/v2`;
|
||||
|
||||
export const getCommandItems = async (commandId: number) => {
|
||||
const { data } = await apiClient.get(`${API}/commands/${commandId}/items`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import apiClient from "./client";
|
||||
import apiClient, { API_BASE_URL } from "./client";
|
||||
import type {
|
||||
DeliveryStatus,
|
||||
QueueInfo,
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const API = "https://mln-uber.club/api/v1/livreur";
|
||||
const API = `${API_BASE_URL}/api/v1/livreur`;
|
||||
|
||||
// ============================================
|
||||
// STATUT
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from "axios";
|
||||
import { getToken, getAdminToken } from "../auth/tokenStorage";
|
||||
|
||||
// Change this to your server IP/domain
|
||||
export const API_BASE_URL = "https://mln-uber.club";
|
||||
export const API_BASE_URL =
|
||||
process.env.EXPO_PUBLIC_API_URL ?? "https://mln-uber.club";
|
||||
|
||||
const apiClient = axios.create({
|
||||
baseURL: API_BASE_URL,
|
||||
|
||||
Reference in New Issue
Block a user