diff --git a/frontend-admin/eas.json b/frontend-admin/eas.json index c3b769bf..150b0152 100644 --- a/frontend-admin/eas.json +++ b/frontend-admin/eas.json @@ -15,7 +15,7 @@ "simulator": true }, "env": { - "API_URL": "http://5.181.0.112" + "API_URL": "https://uber-stup.club" } }, "preview": { @@ -24,7 +24,7 @@ "buildType": "apk" }, "env": { - "API_URL": "http://5.181.0.112" + "API_URL": "https://uber-stup.club" } }, "production": { @@ -34,7 +34,7 @@ "buildType": "apk" }, "env": { - "API_URL": "http://5.181.0.112" + "API_URL": "https://uber-stup.club" } } } diff --git a/frontend-admin/src/api/api_admin.ts b/frontend-admin/src/api/api_admin.ts index 0fa8fc60..3393db6f 100644 --- a/frontend-admin/src/api/api_admin.ts +++ b/frontend-admin/src/api/api_admin.ts @@ -9,8 +9,8 @@ import type { Alert, } from "./types"; -const V2 = "http://5.181.0.112/api/v2"; -const CABINE_URL = "http://5.181.0.112/api/v1/cabine"; +const V2 = "https://uber-stup.club/api/v2"; +const CABINE_URL = "https://uber-stup.club/api/v1/cabine"; // ============================================ // AUTH @@ -173,7 +173,10 @@ export const validateCommand = async (commandId: number) => { return { success: true, message: data.message }; }; -export const proposeAddressChangeAdmin = async (commandId: number, proposedAddress: string) => { +export const proposeAddressChangeAdmin = async ( + commandId: number, + proposedAddress: string, +) => { const { data } = await apiClient.post( `${V2}/admin/protected/orders/${commandId}/propose-address`, { proposed_address: proposedAddress }, diff --git a/frontend-admin/src/api/api_cabine.ts b/frontend-admin/src/api/api_cabine.ts index dc3ee2b8..a8fa014c 100644 --- a/frontend-admin/src/api/api_cabine.ts +++ b/frontend-admin/src/api/api_cabine.ts @@ -6,8 +6,8 @@ import type { Alert, } from "./types"; -const API = "http://5.181.0.112/api/v1/cabine"; -const V2 = "http://5.181.0.112/api/v2"; +const API = "https://uber-stup.club/api/v1/cabine"; +const V2 = "https://uber-stup.club/api/v2"; // ============================================ // ITEMS @@ -117,7 +117,10 @@ export const deleteCommand = async (commandId: number) => { return { success: true, message: data.message }; }; -export const proposeAddressChangeCabine = async (commandId: number, proposedAddress: string) => { +export const proposeAddressChangeCabine = async ( + commandId: number, + proposedAddress: string, +) => { const { data } = await apiClient.post( `${API}/commands/${commandId}/propose-address`, { proposed_address: proposedAddress }, diff --git a/frontend-admin/src/api/api_delivery.ts b/frontend-admin/src/api/api_delivery.ts index dcea78a7..4ff46292 100644 --- a/frontend-admin/src/api/api_delivery.ts +++ b/frontend-admin/src/api/api_delivery.ts @@ -7,7 +7,7 @@ import type { Alert, } from "./types"; -const API = "http://5.181.0.112/api/v1/livreur"; +const API = "https://uber-stup.club/api/v1/livreur"; // ============================================ // STATUT diff --git a/frontend-admin/src/api/client.ts b/frontend-admin/src/api/client.ts index 4961112e..4fe0135d 100644 --- a/frontend-admin/src/api/client.ts +++ b/frontend-admin/src/api/client.ts @@ -2,7 +2,7 @@ import axios from "axios"; import { getToken, getAdminToken } from "../auth/tokenStorage"; // Change this to your server IP/domain -export const API_BASE_URL = "http://5.181.0.112"; +export const API_BASE_URL = "https://uber-stup.club"; const apiClient = axios.create({ baseURL: API_BASE_URL, diff --git a/mobile/src/api/api.ts b/mobile/src/api/api.ts index fc5c6801..d360f6c8 100644 --- a/mobile/src/api/api.ts +++ b/mobile/src/api/api.ts @@ -11,7 +11,7 @@ import type { import { getToken } from "../auth/tokenStorage"; import { extractUsernameFromToken } from "../auth/jwtUtils"; -const V1 = "http://5.181.0.112/api/v1"; +const V1 = "https://uber-stup.club/api/v1"; export const getJwtUsername = async (): Promise => { const token = await getToken(); @@ -371,7 +371,10 @@ export const respondToAddressProposal = async ( `${V1}/commands/${commandId}/address/respond`, { accepted }, ); - return { success: true, message: data.message || "Réponse enregistrée" }; + return { + success: true, + message: data.message || "Réponse enregistrée", + }; } catch (error: any) { return { success: false, diff --git a/mobile/src/api/client.ts b/mobile/src/api/client.ts index 922c5c8f..d75a799d 100644 --- a/mobile/src/api/client.ts +++ b/mobile/src/api/client.ts @@ -2,7 +2,7 @@ import axios from "axios"; import { getToken, getAdminToken } from "../auth/tokenStorage"; // Change this to your server IP/domain -export const API_BASE_URL = "http://5.181.0.112"; +export const API_BASE_URL = "https://uber-stup.club"; const apiClient = axios.create({ baseURL: API_BASE_URL,