은승우

Update app.js

Showing 1 changed file with 2 additions and 1 deletions
1 -
2 var express = require("express"); 1 var express = require("express");
3 var app = express(); 2 var app = express();
4 const line = require('@line/bot-sdk'); 3 const line = require('@line/bot-sdk');
...@@ -81,8 +80,10 @@ function handleEvent(event) { ...@@ -81,8 +80,10 @@ function handleEvent(event) {
81 }; 80 };
82 //papago 언어 감지 81 //papago 언어 감지
83 request.post(detect_options, (error,response,body)=>{ 82 request.post(detect_options, (error,response,body)=>{
83 +
84 if(!error && response.statusCode == 200){ 84 if(!error && response.statusCode == 200){
85 var detect_body = JSON.parse(response.body); 85 var detect_body = JSON.parse(response.body);
86 + console.log(detect_body);
86 var source = ''; 87 var source = '';
87 var target = ''; 88 var target = '';
88 var result = { type: 'text', text:''}; 89 var result = { type: 'text', text:''};
......