Commit 3be5adc66dfcc179b93aaa6fc55fe0da440bf1c6
1 parent
71770f47
Exists in
master
and in
1 other branch
Adiciona ID nos retornos do callback
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
helpers/core.js
| ... | ... | @@ -27,7 +27,7 @@ function call(id, command_line, req, res) { |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | // Se o core executou normal |
| 30 | - res.send(200, { 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.flv' }); | |
| 30 | + res.send(200, { 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.flv', 'id' : id }); | |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | 33 | // Se a chamada deu erro |
| ... | ... | @@ -47,9 +47,9 @@ function call(id, command_line, req, res) { |
| 47 | 47 | |
| 48 | 48 | // Se o core executou com erro |
| 49 | 49 | if (code === 0) { |
| 50 | - var data = querystring.stringify({ 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.mp4' }); | |
| 50 | + var data = querystring.stringify({ 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.mp4', 'id' : id }); | |
| 51 | 51 | } else { |
| 52 | - var data = querystring.stringify({ 'error': 'Erro no Core', 'code': code }); | |
| 52 | + var data = querystring.stringify({ 'error': 'Erro no Core', 'code': code, 'id' : id }); | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Chama o callback | ... | ... |