mirror of
https://github.com/logos-storage/ethcc-demo.git
synced 2026-01-07 15:43:11 +00:00
codex plugin cleanup
This commit is contained in:
parent
342eba171c
commit
3fb5a59069
@ -1,19 +1,9 @@
|
|||||||
export default {
|
export default {
|
||||||
install: (app, { codexRestUrl, myAddress }) => {
|
install: (app, { codexRestUrl, myAddress }) => {
|
||||||
// const baseUrl = new URL(codexRestUrl)
|
|
||||||
const options = {
|
|
||||||
mode: 'cors'
|
|
||||||
}
|
|
||||||
const codexApi = {
|
const codexApi = {
|
||||||
info: () => {
|
info: () => fetch(`${codexRestUrl}/debug/info`),
|
||||||
return fetch(`${codexRestUrl}/debug/info`, options)
|
download: (cid) => fetch(`${codexRestUrl}/data/${cid}/network`),
|
||||||
},
|
downloadLocal: (cid) => fetch(`${codexRestUrl}/data/${cid}`)
|
||||||
download: (cid) => {
|
|
||||||
return fetch(`${codexRestUrl}/data/${cid}/network`, options)
|
|
||||||
},
|
|
||||||
downloadLocal: (cid) => {
|
|
||||||
return fetch(`${codexRestUrl}/data/${cid}`, options)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
app.provide('myAddress', myAddress)
|
app.provide('myAddress', myAddress)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user