WIP -- handle state change requests
This commit is contained in:
parent
2400504827
commit
7c15ce0ae8
3 changed files with 32 additions and 2 deletions
|
|
@ -87,6 +87,12 @@ function trade(req, res) {
|
|||
});
|
||||
}
|
||||
|
||||
function stateChange(req, res) {
|
||||
plugins.stateChange(session(req), req.body, function(err) {
|
||||
res.json(200)
|
||||
})
|
||||
}
|
||||
|
||||
function send(req, res) {
|
||||
plugins.sendBitcoins(session(req), req.body, function(err, status) {
|
||||
// TODO: use status.statusCode here after confirming machine compatibility
|
||||
|
|
@ -189,6 +195,7 @@ function init(localConfig) {
|
|||
app.get('/poll', authMiddleware, reloadConfigMiddleware, poll);
|
||||
|
||||
app.post('/trade', authMiddleware, trade);
|
||||
app.post('/state', authMiddleware, stateChange);
|
||||
app.post('/send', authMiddleware, send);
|
||||
|
||||
app.post('/cash_out', authMiddleware, cashOut);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue