let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
export const getAssetDetails = async (filename: string) => {
  console.log('filename: ', filename);
  try {
    const response = await fetch(`${BackEnd_url}/api/v1/assetDetails`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ filename }),
    });

    if (!response.ok) {
      console.error("Failed to fetch asset details");
    }

    const result = await response.json();
    return result;
  } catch (error: any) {
    echo.error("Failed to fetch assetg details");
    // console.error("Error fetching category:", error.message);
    console.log(error.message);
  }
};
