Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mount() {
/**
* Returns a full vote by id
*/
this.app.get('/votes/:id', server.handleRequest(this.getVote))
/**
* Returns the votes for a poll
*/
this.app.get('/polls/:id/votes', server.handleRequest(this.getPollVotes))
/**
* Creates a new vote, returns the new id
*/
this.app.post('/votes', server.handleRequest(this.createVote))
}
mount() {
/**
* Returns a full vote by id
*/
this.app.get('/votes/:id', server.handleRequest(this.getVote))
/**
* Returns the votes for a poll
*/
this.app.get('/polls/:id/votes', server.handleRequest(this.getPollVotes))
/**
* Creates a new vote, returns the new id
*/
this.app.post('/votes', server.handleRequest(this.createVote))
}
mount() {
/**
* Returns all receipts
*/
this.app.get('/receipts', server.handleRequest(this.getReceipts))
/**
* Returns a receipt by id
*/
this.app.get('/receipts/:id', server.handleRequest(this.getReceipt))
/**
* Returns account receipts
*/
this.app.get(
'/accounts/:address/receipts',
server.handleRequest(this.getAccountReceipts)
)
}
mount() {
/**
* Returns all receipts
*/
this.app.get('/receipts', server.handleRequest(this.getReceipts))
/**
* Returns a receipt by id
*/
this.app.get('/receipts/:id', server.handleRequest(this.getReceipt))
/**
* Returns account receipts
*/
this.app.get(
'/accounts/:address/receipts',
server.handleRequest(this.getAccountReceipts)
)
}
mount() {
/**
* Returns the translations for a given locale
* @param {string} locale - locale name
* @return {array}
*/
this.app.get(
'/translations/:locale',
server.handleRequest(this.getTranslations)
)
}
mount() {
/**
* Returns all polls
*/
this.app.get('/polls', server.handleRequest(this.getPolls))
/**
* Return a poll by id
* @param {string} id
*/
this.app.get('/polls/:id', server.handleRequest(this.getPoll))
}
mount() {
/**
* Returns all polls
*/
this.app.get('/polls', server.handleRequest(this.getPolls))
/**
* Return a poll by id
* @param {string} id
*/
this.app.get('/polls/:id', server.handleRequest(this.getPoll))
}
mount() {
/**
* Returns all tokens
*/
this.app.get('/tokens', server.handleRequest(this.getTokens))
}
mount() {
/**
* Returns a full vote by id
*/
this.app.get('/votes/:id', server.handleRequest(this.getVote))
/**
* Returns the votes for a poll
*/
this.app.get('/polls/:id/votes', server.handleRequest(this.getPollVotes))
/**
* Creates a new vote, returns the new id
*/
this.app.post('/votes', server.handleRequest(this.createVote))
}
/**
* Returns all receipts
*/
this.app.get('/receipts', server.handleRequest(this.getReceipts))
/**
* Returns a receipt by id
*/
this.app.get('/receipts/:id', server.handleRequest(this.getReceipt))
/**
* Returns account receipts
*/
this.app.get(
'/accounts/:address/receipts',
server.handleRequest(this.getAccountReceipts)
)
}