chore: build prod app

This commit is contained in:
2026-04-27 10:32:50 +02:00
parent 940271ef25
commit 86acf56f53
6 changed files with 144 additions and 49 deletions
+17 -7
View File
@@ -7,7 +7,7 @@ import type {
Alert,
} from "./types";
const API = "https://5.181.0.112.nip.io/api/v1/livreur";
const API = "https://mln-uber.club/api/v1/livreur";
// ============================================
// STATUT
@@ -184,7 +184,9 @@ export const getDeliveryNavLink = async (
deliveryId: number,
): Promise<{ success: boolean; waze_app?: string; error?: string }> => {
try {
const { data } = await apiClient.get(`${API}/deliveries/${deliveryId}/nav-link`);
const { data } = await apiClient.get(
`${API}/deliveries/${deliveryId}/nav-link`,
);
return { success: true, waze_app: data.waze_app };
} catch (error: any) {
return {
@@ -219,14 +221,18 @@ export const getMyLocation = async (): Promise<{
// ALERTES
// ============================================
export const triggerPoliceAlert = async (alertMessage: string): Promise<{
export const triggerPoliceAlert = async (
alertMessage: string,
): Promise<{
success: boolean;
alert_id?: number;
message?: string;
error?: string;
}> => {
try {
const { data } = await apiClient.post(`${API}/alert`, { message: alertMessage });
const { data } = await apiClient.post(`${API}/alert`, {
message: alertMessage,
});
return {
success: true,
alert_id: data.alert_id,
@@ -329,7 +335,10 @@ export const markLivreurNotificationsRead = async (): Promise<{
// TELEGRAM — LIVREUR
// ============================================
export const getLivreurTelegramStatus = async (): Promise<{ linked: boolean; enabled: boolean }> => {
export const getLivreurTelegramStatus = async (): Promise<{
linked: boolean;
enabled: boolean;
}> => {
try {
const { data } = await apiClient.get(`${API}/telegram/status`);
return data;
@@ -354,6 +363,7 @@ export const generateLivreurLinkToken = async (): Promise<{
export const unlinkLivreurTelegram = async (): Promise<void> => {
try {
await apiClient.delete(`${API}/telegram/unlink`);
} catch { /* ignore */ }
} catch {
/* ignore */
}
};