Skip to content

Commit

Permalink
Merge pull request #241 from bigchaindb/remove-votes-api
Browse files Browse the repository at this point in the history
remove votes endpoint
  • Loading branch information
jernejpregelj committed Aug 31, 2018
2 parents ffe25a6 + 355dd62 commit 885c247
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
14 changes: 1 addition & 13 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ export default class Connection {
'transactionsCommit': 'transactions?mode=commit',
'transactionsDetail': 'transactions/%(transactionId)s',
'assets': 'assets',
'metadata': 'metadata',
'votes': 'votes'
'metadata': 'metadata'
}[endpoint]
}

Expand Down Expand Up @@ -139,17 +138,6 @@ export default class Connection {
})
}

/**
* @param blockId
*/
listVotes(blockId) {
return this._req(Connection.getApiUrls('votes'), {
query: {
block_id: blockId
}
})
}

/**
* @param transaction
*/
Expand Down
15 changes: 0 additions & 15 deletions test/connection/test_connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
const expectedPath = 'path'
const search = 'abc'
Expand Down

0 comments on commit 885c247

Please sign in to comment.