은승우

Update app.js

Showing 1 changed file with 2 additions and 2 deletions
...@@ -81,7 +81,7 @@ function handleEvent(event) { ...@@ -81,7 +81,7 @@ function handleEvent(event) {
81 return Promise.resolve(null); 81 return Promise.resolve(null);
82 } 82 }
83 else if (event.type == 'message'&& event.message.type == 'image') { 83 else if (event.type == 'message'&& event.message.type == 'image') {
84 - return new Promise((resolve,reject)=>{ 84 + return new Promise(async(resolve,reject)=>{
85 console.log("!"); 85 console.log("!");
86 var cheerio = require('cheerio'); 86 var cheerio = require('cheerio');
87 87
...@@ -102,7 +102,7 @@ function handleEvent(event) { ...@@ -102,7 +102,7 @@ function handleEvent(event) {
102 }, 102 },
103 body: event.message.image 103 body: event.message.image
104 }; 104 };
105 - request.post(options, function (error, response, body) { 105 + await request.post(options, function (error, response, body) {
106 var data=JSON.stringify(body); 106 var data=JSON.stringify(body);
107 var text=''; 107 var text='';
108 console.log(data); 108 console.log(data);
......