mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-06-10 20:02:11 +02:00
Merge pull request #241 from bigchaindb/remove-votes-api
remove votes endpoint
This commit is contained in:
commit
885c2478ad
|
@ -65,8 +65,7 @@ export default class Connection {
|
||||||
'transactionsCommit': 'transactions?mode=commit',
|
'transactionsCommit': 'transactions?mode=commit',
|
||||||
'transactionsDetail': 'transactions/%(transactionId)s',
|
'transactionsDetail': 'transactions/%(transactionId)s',
|
||||||
'assets': 'assets',
|
'assets': 'assets',
|
||||||
'metadata': 'metadata',
|
'metadata': 'metadata'
|
||||||
'votes': 'votes'
|
|
||||||
}[endpoint]
|
}[endpoint]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,17 +138,6 @@ export default class Connection {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param blockId
|
|
||||||
*/
|
|
||||||
listVotes(blockId) {
|
|
||||||
return this._req(Connection.getApiUrls('votes'), {
|
|
||||||
query: {
|
|
||||||
block_id: blockId
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param transaction
|
* @param transaction
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -218,21 +218,6 @@ test('Get outputs for a public key and spent=true', t => {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
test('Get votes for a block id', t => {
|
|
||||||
const expectedPath = 'path'
|
|
||||||
const blockId = 'abc'
|
|
||||||
|
|
||||||
conn._req = sinon.spy()
|
|
||||||
Connection.getApiUrls = sinon.stub().returns(expectedPath)
|
|
||||||
|
|
||||||
conn.listVotes(blockId)
|
|
||||||
t.truthy(conn._req.calledWith(
|
|
||||||
expectedPath,
|
|
||||||
{ query: { block_id: blockId } }
|
|
||||||
))
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
test('Get asset for text', t => {
|
test('Get asset for text', t => {
|
||||||
const expectedPath = 'path'
|
const expectedPath = 'path'
|
||||||
const search = 'abc'
|
const search = 'abc'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user