chore: fix URL
This commit is contained in:
@@ -9,8 +9,8 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const V2 = "https://uber-stup.club/api/v2";
|
||||
const CABINE_URL = "https://uber-stup.club/api/v1/cabine";
|
||||
const V2 = "http://5.181.0.112/api/v2";
|
||||
const CABINE_URL = "http://5.181.0.112/api/v1/cabine";
|
||||
|
||||
// ============================================
|
||||
// AUTH
|
||||
@@ -177,7 +177,11 @@ export const notifyClientToDescend = async (commandId: number) => {
|
||||
const { data } = await apiClient.post(
|
||||
`${V2}/admin/protected/orders/${commandId}/notify-client`,
|
||||
);
|
||||
return { success: true, message: data.message, client_username: data.client_username };
|
||||
return {
|
||||
success: true,
|
||||
message: data.message,
|
||||
client_username: data.client_username,
|
||||
};
|
||||
};
|
||||
|
||||
export const confirmReceptionAdmin = async (commandId: number) => {
|
||||
@@ -531,7 +535,12 @@ export const deleteAddress = async (
|
||||
): Promise<{ success: boolean; message: string }> => {
|
||||
const { data } = await apiClient.delete(
|
||||
`${V2}/admin/protected/delete/address`,
|
||||
{ data: { invalid_address: invalidAddress, correct_address: correctAddress } },
|
||||
{
|
||||
data: {
|
||||
invalid_address: invalidAddress,
|
||||
correct_address: correctAddress,
|
||||
},
|
||||
},
|
||||
);
|
||||
return { success: true, message: data.message };
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const API = "https://uber-stup.club/api/v1/cabine";
|
||||
const V2 = "https://uber-stup.club/api/v2";
|
||||
const API = "http://5.181.0.112/api/v1/cabine";
|
||||
const V2 = "http://5.181.0.112/api/v2";
|
||||
|
||||
// ============================================
|
||||
// ITEMS
|
||||
@@ -121,7 +121,11 @@ export const notifyClientToDescendCabine = async (commandId: number) => {
|
||||
const { data } = await apiClient.post(
|
||||
`${API}/commands/${commandId}/notify-client`,
|
||||
);
|
||||
return { success: true, message: data.message, client_username: data.client_username };
|
||||
return {
|
||||
success: true,
|
||||
message: data.message,
|
||||
client_username: data.client_username,
|
||||
};
|
||||
};
|
||||
|
||||
export const getCabineLivreursList = async (): Promise<
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
Alert,
|
||||
} from "./types";
|
||||
|
||||
const API = "https://uber-stup.club/api/v1/livreur";
|
||||
const API = "http://5.181.0.112/api/v1/livreur";
|
||||
|
||||
// ============================================
|
||||
// STATUT
|
||||
|
||||
@@ -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 = "https://uber-stup.club";
|
||||
export const API_BASE_URL = "http://5.181.0.112";
|
||||
|
||||
const apiClient = axios.create({
|
||||
baseURL: API_BASE_URL,
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
import { getToken } from "../auth/tokenStorage";
|
||||
import { extractUsernameFromToken } from "../auth/jwtUtils";
|
||||
|
||||
const V1 = "https://uber-stup.club/api/v1";
|
||||
const V1 = "http://5.181.0.112/api/v1";
|
||||
|
||||
export const getJwtUsername = async (): Promise<string | null> => {
|
||||
const token = await getToken();
|
||||
|
||||
@@ -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 = "https://uber-stup.club";
|
||||
export const API_BASE_URL = "http://5.181.0.112";
|
||||
|
||||
const apiClient = axios.create({
|
||||
baseURL: API_BASE_URL,
|
||||
|
||||
Reference in New Issue
Block a user