let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;

export const getAssetImages = async (cursor?: string) => {
    try {
        const response = await fetch(
            `${url_Backend_dwinzo}/api/v3/AssetDatas?limit=10${cursor ? `&cursor=${cursor}` : ""}`,
            {
                method: "GET",
                headers: {
                    "Content-Type": "application/json",
                },
            }
        );

        if (!response.ok) {
            echo.error("Failed to fetch assets");
        }

        return await response.json();
    } catch {
        echo.error("Failed to fetch assets");
    }
};
