은승우

Update app.js

Showing 1 changed file with 2 additions and 7 deletions
...@@ -85,9 +85,8 @@ async function handleEvent(event) { ...@@ -85,9 +85,8 @@ async function handleEvent(event) {
85 client.getMessageContent(event.message.id) 85 client.getMessageContent(event.message.id)
86 .then((stream) => { 86 .then((stream) => {
87 stream.on('data', (chunk) => { 87 stream.on('data', (chunk) => {
88 - console.log(chunk);
89 client.replyMessage(event.replyToken,chunk).then(resolve).catch(reject); 88 client.replyMessage(event.replyToken,chunk).then(resolve).catch(reject);
90 - 89 + /*
91 var cheerio = require('cheerio'); 90 var cheerio = require('cheerio');
92 91
93 var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; 92 var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
...@@ -138,13 +137,9 @@ async function handleEvent(event) { ...@@ -138,13 +137,9 @@ async function handleEvent(event) {
138 } 137 }
139 client.replyMessage(event.replyToken,result).then(resolve).catch(reject); 138 client.replyMessage(event.replyToken,result).then(resolve).catch(reject);
140 }); 139 });
140 + });*/
141 }); 141 });
142 }); 142 });
143 - stream.on('error', (err) => {
144 - // error handling
145 - });
146 - });
147 -
148 }) 143 })
149 } 144 }
150 else if(event.type == 'message' && event.message.type == 'text') 145 else if(event.type == 'message' && event.message.type == 'text')
......