Skip to content

Commit

Permalink
Update http routes, add /circulating
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Mar 13, 2019
1 parent 1dfc013 commit 0deb170
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/HttpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ export const HttpServer = ({ blocks, status }) => {
app.set('x-powered-by', false)

app.use('/status', (req, res) => {
res.send(status.state)
const data = status.getState().data
res.send(data)
})

app.use('/circulating', (req, res) => {
const data = blocks.getCirculatingSupply().data
res.send(data)
})

// 404
Expand Down

0 comments on commit 0deb170

Please sign in to comment.