chore: fix reset point
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
"simulator": true
|
"simulator": true
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"API_URL": "http://5.181.0.112"
|
"API_URL": "https://uber-stup.club"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preview": {
|
"preview": {
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"buildType": "apk"
|
"buildType": "apk"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"API_URL": "http://5.181.0.112"
|
"API_URL": "https://uber-stup.club"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"production": {
|
"production": {
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"buildType": "apk"
|
"buildType": "apk"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"API_URL": "http://5.181.0.112"
|
"API_URL": "https://uber-stup.club"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import type {
|
|||||||
Alert,
|
Alert,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
const V2 = "http://5.181.0.112/api/v2";
|
const V2 = "https://uber-stup.club/api/v2";
|
||||||
const CABINE_URL = "http://5.181.0.112/api/v1/cabine";
|
const CABINE_URL = "https://uber-stup.club/api/v1/cabine";
|
||||||
|
|
||||||
// ============================================
|
// ============================================
|
||||||
// AUTH
|
// AUTH
|
||||||
@@ -173,7 +173,10 @@ export const validateCommand = async (commandId: number) => {
|
|||||||
return { success: true, message: data.message };
|
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(
|
const { data } = await apiClient.post(
|
||||||
`${V2}/admin/protected/orders/${commandId}/propose-address`,
|
`${V2}/admin/protected/orders/${commandId}/propose-address`,
|
||||||
{ proposed_address: proposedAddress },
|
{ proposed_address: proposedAddress },
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import type {
|
|||||||
Alert,
|
Alert,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
const API = "http://5.181.0.112/api/v1/cabine";
|
const API = "https://uber-stup.club/api/v1/cabine";
|
||||||
const V2 = "http://5.181.0.112/api/v2";
|
const V2 = "https://uber-stup.club/api/v2";
|
||||||
|
|
||||||
// ============================================
|
// ============================================
|
||||||
// ITEMS
|
// ITEMS
|
||||||
@@ -117,7 +117,10 @@ export const deleteCommand = async (commandId: number) => {
|
|||||||
return { success: true, message: data.message };
|
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(
|
const { data } = await apiClient.post(
|
||||||
`${API}/commands/${commandId}/propose-address`,
|
`${API}/commands/${commandId}/propose-address`,
|
||||||
{ proposed_address: proposedAddress },
|
{ proposed_address: proposedAddress },
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type {
|
|||||||
Alert,
|
Alert,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
const API = "http://5.181.0.112/api/v1/livreur";
|
const API = "https://uber-stup.club/api/v1/livreur";
|
||||||
|
|
||||||
// ============================================
|
// ============================================
|
||||||
// STATUT
|
// STATUT
|
||||||
|
|||||||
@@ -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 = "http://5.181.0.112";
|
export const API_BASE_URL = "https://uber-stup.club";
|
||||||
|
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
|
|||||||
@@ -11,7 +11,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 = "http://5.181.0.112/api/v1";
|
const V1 = "https://uber-stup.club/api/v1";
|
||||||
|
|
||||||
export const getJwtUsername = async (): Promise<string | null> => {
|
export const getJwtUsername = async (): Promise<string | null> => {
|
||||||
const token = await getToken();
|
const token = await getToken();
|
||||||
@@ -371,7 +371,10 @@ export const respondToAddressProposal = async (
|
|||||||
`${V1}/commands/${commandId}/address/respond`,
|
`${V1}/commands/${commandId}/address/respond`,
|
||||||
{ accepted },
|
{ accepted },
|
||||||
);
|
);
|
||||||
return { success: true, message: data.message || "Réponse enregistrée" };
|
return {
|
||||||
|
success: true,
|
||||||
|
message: data.message || "Réponse enregistrée",
|
||||||
|
};
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
|
|||||||
@@ -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 = "http://5.181.0.112";
|
export const API_BASE_URL = "https://uber-stup.club";
|
||||||
|
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
|
|||||||
Reference in New Issue
Block a user