update for inifile mover
This commit is contained in:
19
server.js
19
server.js
@ -36,10 +36,23 @@ function callLoadInitializeData(req, res, resdata){
|
|||||||
// The whole response has been received. Print out the result.
|
// The whole response has been received. Print out the result.
|
||||||
resp.on('end', () => {
|
resp.on('end', () => {
|
||||||
if(data !== 'no match'){
|
if(data !== 'no match'){
|
||||||
|
|
||||||
|
data = {
|
||||||
|
"status": "INSERT ERROR",
|
||||||
|
"detail": {
|
||||||
|
"sheetname": "ini_データ入力シート",
|
||||||
|
"construction_id": "5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resdata = JSON.parse(data);
|
resdata = JSON.parse(data);
|
||||||
console.log(resdata);
|
console.log(resdata.status);
|
||||||
res.status(200).send('OK');
|
if(resdata.status=="complete"){
|
||||||
|
res.status(200).send('OK');
|
||||||
|
}else if(resdata.status=="INSERT ERROR"){
|
||||||
|
res.status(500).json("insert error");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user