From 0145c7e1c41eaac26b960f8e28fa60df769b4e44 Mon Sep 17 00:00:00 2001 From: Fernando Brito Date: Tue, 7 Oct 2014 18:42:07 -0300 Subject: [PATCH] Diminui escopo de variável --- endpoints/video.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/endpoints/video.js b/endpoints/video.js index 186462e..57bfd32 100644 --- a/endpoints/video.js +++ b/endpoints/video.js @@ -26,8 +26,6 @@ function init(req, res) { return; } - var video; - /* Checa se o arquivo de vídeo submetivo possui uma extensão válida */ if (req.files.video !== undefined) { if (parameters.checkVideo(req.files.video.name) === false) { @@ -35,7 +33,7 @@ function init(req, res) { return; } - video = { + var video = { 'name': req.files.video.name, 'path': req.files.video.path } @@ -48,7 +46,7 @@ function init(req, res) { response.pipe(fs.createWriteStream(id)); - video = { + var video = { 'name': req.body.video_url.substring(req.body.video_url.lastIndexOf('/') + 1), 'path': id } @@ -84,7 +82,7 @@ function processVideo(id, video, req, res) { /* Cria a linha de comando */ var command_line = 'vlibras_user/vlibras-core/./vlibras ' + parameters.getServiceType(req.body.servico) + ' uploads/' + id + '/' + video.name + ' 1 ' + parameters.getPosition(req.body.posicao) + ' ' + parameters.getSize(req.body.tamanho) + ' ' + - parameters.getTransparency(req.body.transparencia) + ' ' + id + '> /tmp/core_log 2>&1'; + parameters.getTransparency(req.body.transparencia) + ' ' + id + ' > /tmp/core_log 2>&1'; console.log(command_line); -- libgit2 0.21.2