let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
export const fetchGltfUrl = async (filename: string, AssetID: string) => {
  try {
    const response = await fetch(
      `${BackEnd_url}/api/v2/assetDetails/${filename}/${AssetID}`,
      {
        method: "GET",
        headers: {
          "Content-Type": "application/json",
        },
        // body: JSON.stringify(assetData),
      }
    );

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

    const result = await response.json();

    return result;
  } catch (error: any) {
    //
    console.log(error.message);
  }
}
