Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Ocean Node.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
""
]
},
"description": "Returns node identity and the list of available service endpoints (nodeId, chainIds, providerAddress, nodePublicKey, serviceEndpoints, software, version)."
"description": "Returns node identity (nodeId, chainIds, providerAddress, nodePublicKey, software, version)."
}
}
]
Expand Down
4 changes: 0 additions & 4 deletions src/@types/express.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/httpRoutes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { fileInfoRoute } from './fileInfo.js'
import { computeRoutes } from './compute.js'
import { queueRoutes } from './queue.js'
import { jobsRoutes } from './jobs.js'
import { addMapping, allRoutesMapping, findPathName } from './routeUtils.js'
import { PolicyServerPassthroughRoute } from './policyServer.js'
import { authRoutes } from './auth.js'
import { adminConfigRoutes } from './adminConfig.js'
Expand Down Expand Up @@ -71,20 +70,3 @@ httpRoutes.use(accessListRoutes)
// escrow events routes
// /api/services/escrow/events
httpRoutes.use(escrowRoutes)

export function getAllServiceEndpoints() {
httpRoutes.stack.forEach(addMapping.bind(null, []))
const data: any = {}
const keys = allRoutesMapping.keys()
for (const key of keys) {
const pathData = allRoutesMapping.get(key)
const name = findPathName(pathData[0], pathData[1])
if (name) {
data[name] = pathData
} else {
// use the key
data[key] = pathData
}
}
return data
}
4 changes: 2 additions & 2 deletions src/components/httpRoutes/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { SERVICES_API_BASE_PATH } from '../../utils/constants.js'

export const jobsRoutes = express.Router()

jobsRoutes.get(`${SERVICES_API_BASE_PATH}/jobs/:job`, (req, res) => {
jobsRoutes.get(`${SERVICES_API_BASE_PATH}/jobs/:jobId`, (req, res) => {
try {
const indexer: OceanIndexer = req.oceanNode.getIndexer()
if (indexer) {
const jobs = indexer.getJobsPool((req.params.job as string) || null)
const jobs = indexer.getJobsPool((req.params.jobId as string) || null)
res.header('Content-Type', 'application/json')
res.status(200).send(JSON.stringify({ jobs }))
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/components/httpRoutes/rootEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import express from 'express'
import { HTTP_LOGGER } from '../../utils/logging/common.js'
import { getAllServiceEndpoints } from './index.js'
export const rootEndpointRoutes = express.Router()

rootEndpointRoutes.get('/', (req, res) => {
Expand All @@ -14,7 +13,6 @@ rootEndpointRoutes.get('/', (req, res) => {
chainIds: config.supportedNetworks ? Object.keys(config.supportedNetworks) : [],
providerAddress: keyManager.getEthAddress(),
nodePublicKey: keyManager.getPublicKey(),
serviceEndpoints: getAllServiceEndpoints(),
software: 'Ocean-Node',
version: '0.0.1'
})
Expand Down
264 changes: 0 additions & 264 deletions src/components/httpRoutes/routeUtils.ts

This file was deleted.

Loading
Loading