Showing
2 changed files
with
6 additions
and
6 deletions
lib/db.js
0 → 100644
| ... | @@ -19,12 +19,8 @@ module.exports = (server, app) => { | ... | @@ -19,12 +19,8 @@ module.exports = (server, app) => { |
| 19 | if (err) throw err; | 19 | if (err) throw err; |
| 20 | // api의 대답이 있을경우 실행 | 20 | // api의 대답이 있을경우 실행 |
| 21 | if (api_res) { | 21 | if (api_res) { |
| 22 | - const sql = `INSERT INTO dataset (question,option_1,option_2,option_3,option_4,answer,user_id) VALUES (?,?,?,?,?,?,?)`; | 22 | + console.log(api_body); |
| 23 | - db.query(sql, [question, option[0], option[1], option[2], option[3],machine_body.answer,user_id], function (err, result) { | 23 | + return response.send("ok"); |
| 24 | - if (err) throw err; | ||
| 25 | - console.log("dataset successfully inserted into DB") | ||
| 26 | - }); | ||
| 27 | - return response.send( { answer: machine_body.answer } ); | ||
| 28 | } | 24 | } |
| 29 | }); | 25 | }); |
| 30 | }, 60 * 1000); //1분마다 호출 | 26 | }, 60 * 1000); //1분마다 호출 | ... | ... |
-
Please register or login to post a comment