Ubuntu

update

Showing 1 changed file with 0 additions and 7 deletions
......@@ -18,8 +18,6 @@ var ans_sheet="", i, question, answer, contents, result;
app.post('/hook', function (req, res) {
var eventObj = req.body.events[0];
var message = eventObj.message;
ans_sheet="B0=1 B1=1 B2=1 B3=1 B4=1 B5=1 B6=1 B7=1 B8=1 B9=1 B10=1 B11=1 B12=1 B13=1 B14=1 B15=1 B16=1 B17=1 B18=1 B19=1 B20=1 B21=1 B22=1 B23=1 B24=1 B25=1 B26=1 B27=";
i=28;
console.log('======================', new Date() ,'======================');
console.log('[request]', req.body);
console.log('[request source] ', eventObj.source);
......@@ -27,7 +25,6 @@ app.post('/hook', function (req, res) {
if (message.text=="시작"){
i=0;
ans_sheet="";
console.log("=====================================");
request.get({
url:Question_URL
},function(err,res,body){
......@@ -57,14 +54,12 @@ app.post('/hook', function (req, res) {
}]
}
},(error, response, body) => {
console.log("=====================================");
i+=1;
});
});
}
else if(message.text=="1" || message.text=="2"){
console.log("=====================================");
ans_sheet+=message.text+" ";
console.log(ans_sheet);
if (i==28){
......@@ -130,9 +125,7 @@ app.post('/hook', function (req, res) {
}]
}
},(error, response, body) => {
console.log("=====================================");
i+=1;
});
});
}
......