codex plugin cleanup

This commit is contained in:
Eric 2024-06-17 17:27:15 +10:00
parent 342eba171c
commit 3fb5a59069
No known key found for this signature in database

View File

@ -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)