From 3fb5a59069b2e8445a89c1c78eeabe1c30a43c41 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:27:15 +1000 Subject: [PATCH] codex plugin cleanup --- src/plugins/CodexPlugin.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/plugins/CodexPlugin.js b/src/plugins/CodexPlugin.js index ad9ecf7..59bca64 100644 --- a/src/plugins/CodexPlugin.js +++ b/src/plugins/CodexPlugin.js @@ -1,19 +1,9 @@ export default { install: (app, { codexRestUrl, myAddress }) => { - // const baseUrl = new URL(codexRestUrl) - const options = { - mode: 'cors' - } const codexApi = { - info: () => { - return fetch(`${codexRestUrl}/debug/info`, options) - }, - download: (cid) => { - return fetch(`${codexRestUrl}/data/${cid}/network`, options) - }, - downloadLocal: (cid) => { - return fetch(`${codexRestUrl}/data/${cid}`, options) - } + info: () => fetch(`${codexRestUrl}/debug/info`), + download: (cid) => fetch(`${codexRestUrl}/data/${cid}/network`), + downloadLocal: (cid) => fetch(`${codexRestUrl}/data/${cid}`) } app.provide('myAddress', myAddress)