sckim

del id, password

Showing 1 changed file with 4 additions and 6 deletions
...@@ -16,10 +16,8 @@ var languagedetect_api_url = 'https://openapi.naver.com/v1/papago/detectLangs' ...@@ -16,10 +16,8 @@ var languagedetect_api_url = 'https://openapi.naver.com/v1/papago/detectLangs'
16 16
17 // Naver Auth Key 17 // Naver Auth Key
18 //새로 발급받은 naver papago api id, pw 입력 18 //새로 발급받은 naver papago api id, pw 입력
19 -var detect_client_id = process.env.detect_client_id; 19 +var client_id = process.env.client_id;
20 -var detect_client_secret = process.env.detect_client_secret; 20 +var client_secret = process.env.client_secret;
21 -var papago_client_id = process.env.papago_client_id;
22 -var papago_client_secret = process.env.papago_client_secret;
23 const config = { 21 const config = {
24 channelAccessToken: process.env.channelAccessToken, 22 channelAccessToken: process.env.channelAccessToken,
25 channelSecret: process.env.channelSecret, 23 channelSecret: process.env.channelSecret,
...@@ -55,7 +53,7 @@ function handleEvent(event) { ...@@ -55,7 +53,7 @@ function handleEvent(event) {
55 var detect_options = { 53 var detect_options = {
56 url : languagedetect_api_url, 54 url : languagedetect_api_url,
57 form : {'query': event.message.text}, 55 form : {'query': event.message.text},
58 - headers: {'X-Naver-Client-Id': detect_client_id, 'X-Naver-Client-Secret': detect_client_secret} 56 + headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret}
59 }; 57 };
60 58
61 //papago 언어 감지 59 //papago 언어 감지
...@@ -80,7 +78,7 @@ function handleEvent(event) { ...@@ -80,7 +78,7 @@ function handleEvent(event) {
80 url: translate_api_url, 78 url: translate_api_url,
81 // 한국어(source : ko), 영어(target: en), 카톡에서 받는 메시지(text) 79 // 한국어(source : ko), 영어(target: en), 카톡에서 받는 메시지(text)
82 form: {'source':source, 'target':target, 'text':event.message.text}, 80 form: {'source':source, 'target':target, 'text':event.message.text},
83 - headers: {'X-Naver-Client-Id': papago_client_id, 'X-Naver-Client-Secret': papago_client_secret} 81 + headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret}
84 }; 82 };
85 83
86 // Naver Post API 84 // Naver Post API
......