chore: build
This commit is contained in:
@@ -194,7 +194,7 @@ export const getAllDeliveryPersonsWithDetails = async (): Promise<{
|
||||
users.map(async (u: any): Promise<DeliveryPerson> => {
|
||||
try {
|
||||
const { data: details } = await apiClient.get(
|
||||
`${V2}/admin/protected/delivery-persons/${u.username}`,
|
||||
`${API}/delivery-persons/${u.username}`,
|
||||
);
|
||||
const d = details.deliveryman || details;
|
||||
const parsedStatus = parseStatus(d.status);
|
||||
@@ -367,7 +367,7 @@ export const markCabineNotificationsRead = async (): Promise<void> => {
|
||||
export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
try {
|
||||
const { data } = await apiClient.get(
|
||||
`https://5.181.0.112.nip.io/api/v1/app-settings`,
|
||||
`${API_BASE_URL}/api/v1/app-settings`,
|
||||
);
|
||||
return {
|
||||
penalties_enabled: data.penalties_enabled ?? true,
|
||||
@@ -427,11 +427,41 @@ export const getAllAddresses = async (): Promise<
|
||||
}));
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// COMMANDES — CABINE
|
||||
// ============================================
|
||||
|
||||
export const getCabineCommands = async (): Promise<{
|
||||
success: boolean;
|
||||
commands: any[];
|
||||
count: number;
|
||||
}> => {
|
||||
try {
|
||||
const { data } = await apiClient.get(`${API}/commands`);
|
||||
return { success: true, commands: data.commands || [], count: data.count || 0 };
|
||||
} catch {
|
||||
return { success: false, commands: [], count: 0 };
|
||||
}
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// CLIENTS — CABINE
|
||||
// ============================================
|
||||
|
||||
export const getCabineAllClients = async (): Promise<any[]> => {
|
||||
try {
|
||||
const { data } = await apiClient.get(`${API}/all/clients`);
|
||||
return data.clients || [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// TELEGRAM — CABINE
|
||||
// ============================================
|
||||
|
||||
const CABINE_API = "https://5.181.0.112.nip.io/api/v1/cabine";
|
||||
const CABINE_API = `${API_BASE_URL}/api/v1/cabine`;
|
||||
|
||||
export const getCabineTelegramStatus = async (): Promise<{
|
||||
linked: boolean;
|
||||
|
||||
Reference in New Issue
Block a user