Skip to content
Snippets Groups Projects
Commit 8950f80a authored by Mahdi Yari's avatar Mahdi Yari
Browse files

Update extraHandler.js

parent 0a9a9c87
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ import { errorObject } from './helpers/errorObject.js'
import { accountsHandler } from './helpers/extra/accounts.js'
import { blocksHandler } from './helpers/extra/blocks.js'
import { commentHandler } from './helpers/extra/comment.js'
import { delegationsHandler } from './helpers/extra/delegations.js'
import { blacklistsHandler } from './helpers/extra/blacklists.js'
import { operationsHandler } from './helpers/extra/operations.js'
import { transactionHandler } from './helpers/extra/transaction.js'
......@@ -69,15 +69,15 @@ export const extraHandler = async (res, params, methodParams, callParams, id, li
})
return
}
// if (methodParams.name === 'delegations') {
// const result = await delegationsHandler(callParams, limit, start, reverse, startParam)
// res.json({
// jsonrpc: '2.0',
// result: result.rows,
// id
// })
// return
// }
if (methodParams.name === 'blacklists') {
const result = await blacklistsHandler(callParams, limit, start, reverse, startParam)
res.json({
jsonrpc: '2.0',
result: result.rows,
id
})
return
}
if (raw) {
const query = `SELECT * FROM hafsql."${methodParams.name}" LIMIT $1`
const result = await pool.query(query, [limit])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment