mirror of
https://github.com/ForFarmTeam/ForFarm.git
synced 2025-12-19 05:54:08 +01:00
13 lines
370 B
TypeScript
13 lines
370 B
TypeScript
import axiosInstance from "./config";
|
|
import type { HarvestUnits } from "@/types";
|
|
|
|
export async function fetchHarvestUnits(): Promise<HarvestUnits[]> {
|
|
try {
|
|
const response = await axiosInstance.get<HarvestUnits[]>("/harvest/units");
|
|
return response.data;
|
|
} catch (error) {
|
|
console.error("Error fetching inventory status:", error);
|
|
return [];
|
|
}
|
|
}
|