Commit fb0e7ac3 authored by priit's avatar priit
Browse files

SessionId mitte serviceId

parent 7ae1bf86
......@@ -33,7 +33,7 @@ function SessionService() {
session.success = true;
session.requestBody = serviceRequest.data;
session.requestFiles = {};
session.isAsync = serviceRequest.data.is_async;
session.isAsync = serviceRequest.data.isAsync;
session.isFinished = false;
self.saveSession(session, function(err){
if(err) return cb(err);
......@@ -164,7 +164,7 @@ function SessionService() {
var response = {};
if (session.id) {
response.serviceId = session.id;
response.sessionId = session.id;
}
response.success = session.success;
......
......@@ -88,7 +88,7 @@ describe('Routing', function() {
throw err;
}
res.body.response.should.have.property('serviceId');
res.body.response.should.have.property('sessionId');
res.body.response.message.should.equal('OK');
res.body.response.should.have.property('pipecontent');
res.body.response.pipecontent.should.not.equal(undefined);
......@@ -144,7 +144,7 @@ describe('Routing', function() {
throw err;
}
res.body.response.should.have.property('serviceId');
res.body.response.should.have.property('sessionId');
res.body.response.message.should.equal('RUNNING');
res.body.response.should.not.have.property('pipecontent');
......
......@@ -13,7 +13,7 @@ var url = baseUrl + '/api/v1/service';
var path = 'keeleliin.log';
var formData = {
"is_async": 0,
"isAsync": 0,
"someparam": 'no',
"content": fs.createReadStream(path)
};
......@@ -28,7 +28,7 @@ request.post( { url: url, formData: formData }, function (err, resp, body) {
var respBody = JSON.parse(resp.body);
getData(respBody.response.serviceId, 'output');
/*getData(respBody.response.serviceId, 'mapping');*/
/*getData(respBody.response.sessionId, 'mapping');*/
}
});
......
......@@ -75,11 +75,11 @@ config.log4js = {
/*var someCommandRequest = {
requestBodyTemplate: {
is_async: null//,
isAsync: null//,
someparam: null
},
requestBodyParamsMappings: {
is_async: {
isAsync: {
usageType: config.paramUsageTypes.META,
filter: function(value){
return value == 1;
......@@ -115,10 +115,10 @@ config.log4js = {
var simpleCommandRequest = {
requestBodyTemplate: {
is_async: null
isAsync: null
},
requestBodyParamsMappings: {
is_async: {
isAsync: {
usageType: config.paramUsageTypes.META,
filter: function(value){
return value == 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment