박찬수

reply.js modified.

Showing 1 changed file with 6 additions and 3 deletions
...@@ -76,6 +76,9 @@ try { ...@@ -76,6 +76,9 @@ try {
76 } 76 }
77 77
78 function Reply(eventObj,replyMsg){ 78 function Reply(eventObj,replyMsg){
79 +
80 + replyMsg = JSON.parse(replyMsg);
81 +
79 request.post( 82 request.post(
80 { 83 {
81 url: TARGET_URL, 84 url: TARGET_URL,
...@@ -86,11 +89,11 @@ function Reply(eventObj,replyMsg){ ...@@ -86,11 +89,11 @@ function Reply(eventObj,replyMsg){
86 "replyToken":eventObj.replyToken, // reply token : 누구한테 보낼 것인지?를 판별하기 위해! 89 "replyToken":eventObj.replyToken, // reply token : 누구한테 보낼 것인지?를 판별하기 위해!
87 "messages":[ 90 "messages":[
88 { 91 {
89 - "type":"text", 92 + "type":"Name",
90 - "text":"Hello, user" 93 + "text":replyMsg.name
91 }, 94 },
92 { 95 {
93 - "type":"text", 96 + "type":"JSON",
94 "text":replyMsg 97 "text":replyMsg
95 } 98 }
96 ] 99 ]
......