Skip to content

refactor: remove /v3 prefix from stargate endpoint #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rsk-explorer-api",
"version": "2.2.2",
"version": "2.2.3",
"description": "RSK Explorer API",
"main": "index.js",
"scripts": {
Expand Down
9 changes: 2 additions & 7 deletions src/api/routes/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import express from 'express'
import bodyParser from 'body-parser'
import httpLogger from '../httpLogger'
import v3ApiRoutes from '../v3/api'
import stargateRoutes from '../stargate/stargate.routes'

const router = express.Router()

Expand Down Expand Up @@ -47,11 +46,7 @@ const Routes = ({ log, api }, send) => {
return sendResult({ res, req, next }, req.body)
})

// v3
router.use('/v3', httpLogger)
router.use('/v3', express.json())
router.use('/v3', express.urlencoded({ extended: true }))
router.use('/v3', v3ApiRoutes)
router.use('/stargate', stargateRoutes)

return router
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Logger from '../../../lib/Logger'
import config from '../../../lib/config'
import Logger from '../../lib/Logger'
import config from '../../lib/config'
import { isAddress } from '@rsksmart/rsk-utils/dist/addresses'
import { getCurrentNetwork, getAssetsValueInUSDT } from '../utils'
import { getCurrentNetwork, getAssetsValueInUSDT } from './utils'

const log = Logger('[v3.stargate.controllers]')

Expand Down
11 changes: 11 additions & 0 deletions src/api/stargate/stargate.routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import express from 'express'
import { validateStargateAddress } from './stargate.controllers'
import httpLogger from '../httpLogger'
const router = express.Router()

router.use(httpLogger)
router.use(express.json())
router.use(express.urlencoded({ extended: true }))
router.get('/validate-stargate-address/:address', validateStargateAddress)

export default router
File renamed without changes.
14 changes: 0 additions & 14 deletions src/api/v3/api.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/api/v3/routes/stargate.routes.js

This file was deleted.

Loading