diff --git a/server.js b/server.js index eb0f0fa..c27cc97 100644 --- a/server.js +++ b/server.js @@ -36,10 +36,23 @@ function callLoadInitializeData(req, res, resdata){ // The whole response has been received. Print out the result. resp.on('end', () => { if(data !== 'no match'){ - + + data = { + "status": "INSERT ERROR", + "detail": { + "sheetname": "ini_データ入力シート", + "construction_id": "5" + } + } + resdata = JSON.parse(data); - console.log(resdata); - res.status(200).send('OK'); + console.log(resdata.status); + if(resdata.status=="complete"){ + res.status(200).send('OK'); + }else if(resdata.status=="INSERT ERROR"){ + res.status(500).json("insert error"); + } + } });