Commit 4172ba35e8d536b65bf3ab09207b4edaf33c3579
1 parent
4ab15cf3
Exists in
master
and in
1 other branch
Refactoring the source code of endpoints files
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
endpoints/video.js
... | ... | @@ -68,6 +68,8 @@ function init(req, res) { |
68 | 68 | |
69 | 69 | child.on('close', function(code, signal){ |
70 | 70 | if (code !== 0) { |
71 | + var path = url.parse(req.body.callback); | |
72 | + | |
71 | 73 | var data = querystring.stringify( { 'error': 'Erro no Core', 'code': code } ); |
72 | 74 | |
73 | 75 | var options = { |
... | ... | @@ -119,6 +121,7 @@ function init(req, res) { |
119 | 121 | |
120 | 122 | /* Listener que dispara quando a requisição ao core da erro */ |
121 | 123 | child.on('error', function(code, signal){ |
124 | + var path = url.parse(req.body.callback); | |
122 | 125 | |
123 | 126 | var data = querystring.stringify( { 'error': 'Erro na chamada ao Core', 'code': code } ); |
124 | 127 | ... | ... |
endpoints/video_legenda.js
... | ... | @@ -80,6 +80,8 @@ function init(req, res) { |
80 | 80 | |
81 | 81 | child.on('close', function(code, signal){ |
82 | 82 | if (code !== 0) { |
83 | + var path = url.parse(req.body.callback); | |
84 | + | |
83 | 85 | var data = querystring.stringify( { 'error': 'Erro no Core', 'code': code } ); |
84 | 86 | |
85 | 87 | var options = { |
... | ... | @@ -131,6 +133,7 @@ function init(req, res) { |
131 | 133 | |
132 | 134 | /* Listener que dispara quando a requisição ao core da erro */ |
133 | 135 | child.on('error', function(code, signal){ |
136 | + var path = url.parse(req.body.callback); | |
134 | 137 | |
135 | 138 | var data = querystring.stringify( { 'error': 'Erro na chamada ao Core', 'code': code } ); |
136 | 139 | ... | ... |