Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -71,10 +71,9 @@ function handleEvent(event) { | ... | @@ -71,10 +71,9 @@ function handleEvent(event) { |
71 | else if(event.message.text.substr(0,4) == "!검색 "){ | 71 | else if(event.message.text.substr(0,4) == "!검색 "){ |
72 | return new Promise(function(resolve, reject) { | 72 | return new Promise(function(resolve, reject) { |
73 | var text_len = event.message.text; | 73 | var text_len = event.message.text; |
74 | - | 74 | + search_api_url += '?query=' + event.message.text.substr(4, text_len - 4) + '&display=1'; |
75 | var search_options = { | 75 | var search_options = { |
76 | url : search_api_url, | 76 | url : search_api_url, |
77 | - form : {'query': event.message.text.substr(4, text_len - 4), 'display': 1}, | ||
78 | headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} | 77 | headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} |
79 | }; | 78 | }; |
80 | request.get(search_options, function(error, response, body){ | 79 | request.get(search_options, function(error, response, body){ | ... | ... |
-
Please register or login to post a comment