mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
remove gatsby-source-ocean
This commit is contained in:
parent
9a18502078
commit
5910faf455
@ -29,12 +29,6 @@ module.exports = {
|
||||
path: `${__dirname}/node_modules/@oceanprotocol/art/`
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-ocean',
|
||||
options: {
|
||||
metadataStoreUri: oceanConfig.metadataStoreUri
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-plugin-sharp',
|
||||
options: {
|
||||
|
@ -1,42 +0,0 @@
|
||||
const axios = require('axios')
|
||||
|
||||
exports.sourceNodes = async (
|
||||
{ actions, createNodeId, createContentDigest },
|
||||
{ metadataStoreUri }
|
||||
) => {
|
||||
const { createNode } = actions
|
||||
|
||||
// Query for all assets to use in creating pages.
|
||||
const result = await axios(`${metadataStoreUri}/api/v1/aquarius/assets`)
|
||||
|
||||
for (let i = 0; i < result.data.ids.length; i++) {
|
||||
const did = result.data.ids[i]
|
||||
|
||||
const metadataResult = await axios(
|
||||
`${metadataStoreUri}/api/v1/aquarius/assets/metadata/${did}`
|
||||
)
|
||||
|
||||
const metadata = {
|
||||
did,
|
||||
...metadataResult.data.attributes
|
||||
}
|
||||
|
||||
const nodeMeta = {
|
||||
id: createNodeId(did),
|
||||
parent: null,
|
||||
children: [],
|
||||
internal: {
|
||||
type: 'OceanAsset',
|
||||
contentDigest: createContentDigest(metadata),
|
||||
description: `All data sets queried from ${metadataStoreUri}`
|
||||
}
|
||||
}
|
||||
|
||||
const node = {
|
||||
...metadata,
|
||||
...nodeMeta
|
||||
}
|
||||
|
||||
await createNode(node)
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"name": "gatsby-source-ocean"
|
||||
}
|
Loading…
Reference in New Issue
Block a user