Skip to content

Commit ac42244

Browse files
committed
test callback and show result of callback
1 parent d8c9378 commit ac42244

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/controllers/processes/callback.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ export function post(req, res) {
1818
}
1919

2020
var jobId = req.params.jobId;
21+
var typeResult = req.query.type
2122

2223
var formatFreeUrl = utils.getFormatFreeUrl(req);
2324

2425
var accept = accepts(req);
2526
var format = accept.type(["json"]);
2627

2728
console.log(
28-
`call received from jobID: ${jobId}, type is '${req.query.type}'`
29+
`call received from jobID: ${jobId}, type is '${typeResult}'`
2930
);
3031

3132
callback.post(formatFreeUrl, jobId, req.query, function (err, content) {
@@ -36,6 +37,10 @@ export function post(req, res) {
3637
return;
3738
}
3839

40+
console.log(
41+
`result '${JSON.stringify(content)}'`
42+
);
43+
3944
switch (format) {
4045
case "json":
4146
res.status(200).json(content);

src/models/processes/callback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function post(neutralUrl, jobId, query, callback) {
2626
}
2727
*/
2828

29-
let content = {};
29+
let content = job.results;
3030
callback(undefined, content);
3131
}
3232

0 commit comments

Comments
 (0)