Commit 4e755e9fe9e0efa5567fea4d225c709a853c9e3a
1 parent
d93f4907
Exists in
master
and in
1 other branch
Refactoring the source code of endpoints files
Showing
2 changed files
with
13 additions
and
0 deletions
Show diff stats
endpoints/video.js
... | ... | @@ -42,6 +42,8 @@ function init(req, res) { |
42 | 42 | req.files.video.name + ' 1 ' + parameters.getPosition(req.body.posicao) + ' ' + parameters.getSize(req.body.tamanho) + ' ' + |
43 | 43 | parameters.getTransparency(req.body.transparencia) + ' ' + properties.ID_FROM_BD; |
44 | 44 | |
45 | + console.log(command_line); | |
46 | + | |
45 | 47 | /* Executa a linha de comando */ |
46 | 48 | child = exec(command_line, function(err, stdout, stderr) { |
47 | 49 | // [stdout] = vlibras-core output |
... | ... | @@ -63,6 +65,7 @@ function init(req, res) { |
63 | 65 | |
64 | 66 | child.on('error', function(code, signal){ |
65 | 67 | res.send(500, parameters.errorMessage('Erro na chamada ao core')); |
68 | + properties.ID_FROM_BD++; | |
66 | 69 | }); |
67 | 70 | } else { |
68 | 71 | |
... | ... | @@ -90,6 +93,8 @@ function init(req, res) { |
90 | 93 | requesting.write(data); |
91 | 94 | requesting.end(); |
92 | 95 | |
96 | + properties.ID_FROM_BD++; | |
97 | + | |
93 | 98 | return; |
94 | 99 | } |
95 | 100 | |
... | ... | @@ -144,6 +149,8 @@ function init(req, res) { |
144 | 149 | |
145 | 150 | requesting.write(data); |
146 | 151 | requesting.end(); |
152 | + | |
153 | + properties.ID_FROM_BD++; | |
147 | 154 | }); |
148 | 155 | |
149 | 156 | res.send(200); | ... | ... |
endpoints/video_legenda.js
... | ... | @@ -54,6 +54,8 @@ function init(req, res) { |
54 | 54 | ' ' + parameters.getPosition(req.body.posicao) + ' ' + parameters.getSize(req.body.tamanho) + ' ' + |
55 | 55 | parameters.getTransparency(req.body.transparencia) + ' ' + properties.ID_FROM_BD; |
56 | 56 | |
57 | + console.log(command_line); | |
58 | + | |
57 | 59 | /* Executa a linha de comando */ |
58 | 60 | child = exec(command_line, function(err, stdout, stderr) { |
59 | 61 | // [stdout] = vlibras-core output |
... | ... | @@ -102,6 +104,8 @@ function init(req, res) { |
102 | 104 | requesting.write(data); |
103 | 105 | requesting.end(); |
104 | 106 | |
107 | + properties.ID_FROM_BD++; | |
108 | + | |
105 | 109 | return; |
106 | 110 | } |
107 | 111 | |
... | ... | @@ -156,6 +160,8 @@ function init(req, res) { |
156 | 160 | |
157 | 161 | requesting.write(data); |
158 | 162 | requesting.end(); |
163 | + | |
164 | + properties.ID_FROM_BD++; | |
159 | 165 | }); |
160 | 166 | |
161 | 167 | res.send(200); | ... | ... |