本文整理汇总了TypeScript中decentraland-server.server.handleRequest方法的典型用法代码示例。如果您正苦于以下问题:TypeScript server.handleRequest方法的具体用法?TypeScript server.handleRequest怎么用?TypeScript server.handleRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类decentraland-server.server
的用法示例。
在下文中一共展示了server.handleRequest方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: mount
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))
}
示例2: mount
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))
}
示例3: mount
mount() {
/**
* Returns the votes for a poll
*/
this.app.get(
'/accountBalances/:address',
server.handleRequest(this.getAccountBalances)
)
}
示例4: mount
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)
)
}
示例5: mount
mount() {
/**
* Returns the translations for a given locale
* @param {string} locale - locale name
* @return {array<Translation>}
*/
this.app.get(
'/translations/:locale',
server.handleRequest(this.getTranslations)
)
}
示例6: mount
mount() {
/**
* Returns the votes for a poll
*/
this.app.get('/polls/:id/options', server.handleRequest(this.getPollVotes))
}
示例7: mount
mount() {
/**
* Returns all tokens
*/
this.app.get('/tokens', server.handleRequest(this.getTokens))
}