diff --git a/fission/src/aps/APSDataManagement.ts b/fission/src/aps/APSDataManagement.ts index df14f73d33..0c6c4a6cec 100644 --- a/fission/src/aps/APSDataManagement.ts +++ b/fission/src/aps/APSDataManagement.ts @@ -160,27 +160,3 @@ export async function getFolderData(project: Project, folder: Folder): Promise { - const auth = APS.auth - if (!auth) { - return undefined - } - - try { - return await fetch(`https://developer.api.autodesk.com/data/v1/projects/${project.id}/items/${item.id}`, { - method: 'GET', - headers: { - 'Authorization': `Bearer ${auth.access_token}` - } - }).then(x => x.json()).then(async x => { - console.debug(x) - const downloadLink = x.included[0].relationships.storage.meta.link.href - console.debug(`Download Link: ${downloadLink}`) - return await fetch(downloadLink, { method: 'GET', headers: { 'Authorization': `Bearer ${auth.access_token}` } }) - }).then(x => x.blob()).then(x => { window.open(URL.createObjectURL(x)) }) - } catch (e) { - console.error('Failed to download item') - return undefined - } -} diff --git a/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx b/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx index b5c596de88..4e63772253 100644 --- a/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx +++ b/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx @@ -3,7 +3,7 @@ import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaPlus } from "react-icons/fa6" import Button from "@/components/Button" import Label, { LabelSize } from "@/components/Label" -import { Data, Folder, Hub, Item, Project, downloadItem, getFolderData, getHubs, getProjects } from "@/aps/APSDataManagement" +import { Data, Folder, Hub, Item, Project, getFolderData, getHubs, getProjects } from "@/aps/APSDataManagement" interface ItemCardProps { id: string @@ -143,7 +143,7 @@ const ImportMirabufModal: React.FC = ({ modalId }) => { id: x.id, buttonText: "import", onClick: () => { - downloadItem(selectedProject, x) + console.log(`Selecting ${x.displayName} (${x.id})`) }, }) : ItemCard({