chore: fix url

This commit is contained in:
2026-05-03 13:44:25 +02:00
parent 78cdf074e2
commit b323cf298c
6 changed files with 18 additions and 15 deletions
+8 -5
View File
@@ -9,8 +9,8 @@ import type {
Alert, Alert,
} from "./types"; } from "./types";
const V2 = "https://mln-uber.club/api/v2"; const V2 = "https://5.181.0.112.nip.io/api/v2";
const CABINE_URL = "https://mln-uber.club/api/v1/cabine"; const CABINE_URL = "https://5.181.0.112.nip.io/api/v1/cabine";
export const loginAdmin = async ( export const loginAdmin = async (
username: string, username: string,
@@ -127,9 +127,12 @@ export const getCommandItems = async (commandId: number) => {
}; };
export const exportApprovedCommandsCSV = async (): Promise<string> => { export const exportApprovedCommandsCSV = async (): Promise<string> => {
const { data } = await apiClient.get(`${V2}/admin/protected/orders/export/csv`, { const { data } = await apiClient.get(
responseType: "text", `${V2}/admin/protected/orders/export/csv`,
}); {
responseType: "text",
},
);
return data as string; return data as string;
}; };
+2 -2
View File
@@ -6,8 +6,8 @@ import type {
Alert, Alert,
} from "./types"; } from "./types";
const API = "https://mln-uber.club/api/v1/cabine"; const API = "https://5.181.0.112.nip.io/api/v1/cabine";
const V2 = "https://mln-uber.club/api/v2"; const V2 = "https://5.181.0.112.nip.io/api/v2";
// ============================================ // ============================================
// ITEMS // ITEMS
+5 -5
View File
@@ -7,7 +7,7 @@ import type {
Alert, Alert,
} from "./types"; } from "./types";
const API = "https://mln-uber.club/api/v1/livreur"; const API = "https://5.181.0.112.nip.io/api/v1/livreur";
// ============================================ // ============================================
// STATUT // STATUT
@@ -376,11 +376,11 @@ export type IssueType =
| "other"; | "other";
export const ISSUE_LABELS: Record<IssueType, string> = { export const ISSUE_LABELS: Record<IssueType, string> = {
client_absent: "Client absent", client_absent: "Client absent",
wrong_address: "Adresse incorrecte", wrong_address: "Adresse incorrecte",
refused_delivery: "Livraison refusée", refused_delivery: "Livraison refusée",
no_access: "Accès impossible", no_access: "Accès impossible",
other: "Autre", other: "Autre",
}; };
export const reportDeliveryIssue = async ( export const reportDeliveryIssue = async (
+1 -1
View File
@@ -2,7 +2,7 @@ import axios from "axios";
import { getToken, getAdminToken } from "../auth/tokenStorage"; import { getToken, getAdminToken } from "../auth/tokenStorage";
// Change this to your server IP/domain // Change this to your server IP/domain
export const API_BASE_URL = "https://mln-uber.club"; export const API_BASE_URL = "https://5.181.0.112.nip.io";
const apiClient = axios.create({ const apiClient = axios.create({
baseURL: API_BASE_URL, baseURL: API_BASE_URL,
+1 -1
View File
@@ -12,7 +12,7 @@ import type {
import { getToken } from "../auth/tokenStorage"; import { getToken } from "../auth/tokenStorage";
import { extractUsernameFromToken } from "../auth/jwtUtils"; import { extractUsernameFromToken } from "../auth/jwtUtils";
const V1 = "https://mln-uber.club/api/v1"; const V1 = "https://5.181.0.112.nip.io/api/v1";
export const getJwtUsername = async (): Promise<string | null> => { export const getJwtUsername = async (): Promise<string | null> => {
const token = await getToken(); const token = await getToken();
+1 -1
View File
@@ -2,7 +2,7 @@ import axios from "axios";
import { getToken, getAdminToken } from "../auth/tokenStorage"; import { getToken, getAdminToken } from "../auth/tokenStorage";
// Change this to your server IP/domain // Change this to your server IP/domain
export const API_BASE_URL = "https://mln-uber.club"; export const API_BASE_URL = "https://5.181.0.112.nip.io";
const apiClient = axios.create({ const apiClient = axios.create({
baseURL: API_BASE_URL, baseURL: API_BASE_URL,