Commit c6a4c743 authored by Caillat Michel's avatar Caillat Michel
Browse files

Renamed some parameters in order to follow the naming standards

parent c562b209
......@@ -99,14 +99,14 @@ var clienthttp = {
});
},
getSumOverSliceRectArea : function(relFITSFilePath, sessionID, iFREQ, RAPix0, RAPix1, DECPix0, DECPix1, callback) {
getSumOverSliceRectArea : function(relFITSFilePath, sessionID, iFREQ, iRA0, iRA1, iDEC0, iDEC1, callback) {
request(this.server+"/getSumOverSliceRectArea?relFITSFilePath="+relFITSFilePath+
"&sessionID="+sessionID+
"&iFREQ="+iFREQ+
"&RAPix0="+RAPix0+
"&RAPix1="+RAPix1+
"&DECPix0="+DECPix0+
"&DECPix1="+DECPix1,
"&iRA0="+iRA0+
"&iRA1="+iRA1+
"&iDEC0="+iDEC0+
"&iDEC1="+iDEC1,
{json: true},
function(error, response, body){
callback(error, response, body)
......@@ -184,6 +184,16 @@ var clienthttp = {
});
},
measureBox: function(relFITSFilePath, iFREQ, iRA0, iRA1, iDEC0, iDEC1, callback) {
let input = {"relFITSFilePath": relFITSFilePath,
"iFREQ": iFREQ,
"iRA0" : iRA0, "iRA1" : iRA1,
"iDEC0" : iDEC0, "iDEC1" : iDEC1};
request.post(this.server+"/measureBox", {json:true, body:input}, function(error, response, body){
callback(error, response, body);
});
},
renderingCapabilities: function(callback) {
request(this.server+"/renderingCapabilities", {json: true}, function (error, response, body){
callback(error, response, body);
......@@ -542,10 +552,10 @@ router.post('/', function(req, res, next) {
req.body.relFITSFilePath,
req.body.sessionID ? req.body.sessionID : 0,
req.body.iFREQ ? parseInt(req.body.iFREQ) : 0,
req.body.RAPix0 ? parseInt(req.body.RAPix0) : 0,
req.body.RAPix1 ? parseInt(req.body.RAPix1) : null,
req.body.DECPix0 ? parseInt(req.body.DECPix0) : 0,
req.body.DECPix1 ? parseInt(req.body.DECPix1) : null,
req.body.iRA0 ? parseInt(req.body.iRA0) : 0,
req.body.iRA1 ? parseInt(req.body.iRA1) : null,
req.body.iDEC0 ? parseInt(req.body.iDEC0) : 0,
req.body.iDEC1 ? parseInt(req.body.iDEC1) : null,
(error, response, body) => {
console.log("getSumOverSliceRectArea callback : entering");
if (error) {
......@@ -761,6 +771,22 @@ router.post('/measureContour', function(req, res, next){
console.log("router.post('/measureContour', function(req, res, next){: exiting");
});
router.post('/measureBox', function(req, res, next){
console.log("router.post('/measureBox', function(req, res, next){: entering");
clienthttp.measureBox(req.body.relFITSFilePath, req.body.iFREQ, req.body.iRA0, req.body.iRA1, req.body.iDEC0, req.body.iDEC1, (error, response, body) => {
console.log("measureBox callback entering");
if (error) {
console.log(error);
}
else {
console.log(body);
res.send(body);
}
console.log("measureBox callback exiting");
});
console.log("router.post('/measureBox', function(req, res, next){: exiting");
});
router.get("/getYtObj", function(req, res, next) {
console.log('router.get("/", function(req, res, next) { : entering ');
clienthttp.getYtObj(req.query.relFITSFilePath,req.query.iRA0, req.query.iRA1, req.query.iDEC0,
......
Supports Markdown
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