Commit bc4925a71c81bc782721202a2f82fc99de11540f

Authored by libras
1 parent 6271956e
Exists in master and in 1 other branch devel

Corrige endpoint ios

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
endpoints/ios.js
... ... @@ -22,19 +22,19 @@ function init(req, res) {
22 22 }
23 23  
24 24 /* Cria a linha de comando */
25   - var command_line = 'echo ' + req.body.texto + ' >> ' + __dirname + '/text_files/' + id + ' && cd ../vlibras-core' +
26   - ' && ./vlibras ' + parameters.getServiceType(req.body.servico) + ' ../vlibras-api/text_files/' +
27   - id + ' ' + parameters.getTransparency(req.body.transparencia) + ' ' + id + ' IOS';
  25 + var command_line = 'echo ' + req.body.texto + ' >> text_files/' + id + ' && mkdir uploads/' + id + ' && vlibras_user/vlibras-core/./vlibras ' + parameters.getServiceType(req.body.servico) + ' text_files/' +
  26 + id + ' ' + parameters.getTransparency(req.body.transparencia) + ' ' + id + ' IOS > /tmp/core_log 2>&1';
  27 +
  28 + console.log(command_line)
28 29  
29 30 /* Executa a linha de comando */
30 31 child = exec(command_line, function(err, stdout, stderr) {
31 32 // [stdout] = vlibras-core output
32   - // console.log(stdout);
33 33 });
34 34  
35 35 /* Listener que dispara quando a requisição ao core finaliza */
36 36 child.on('close', function(code, signal){
37   - res.send(200, { 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.avi' });
  37 + res.send(200, { 'response' : 'http://' + properties.SERVER_IP + ':' + properties.port + '/' + id + '.mp4' });
38 38 });
39 39  
40 40 /* Listener que dispara quando a requisição ao core da erro */
... ...