윤준석

FIX: richMenu 입력 data 및 label 변경

check -> deleteKeyword
checkKeyword -> checkKeywords
new -> newKeyword
...@@ -51,7 +51,7 @@ function handleEvent(event) { ...@@ -51,7 +51,7 @@ function handleEvent(event) {
51 if (event.type !== "message" || event.message.type !== "text") { 51 if (event.type !== "message" || event.message.type !== "text") {
52 console.log(event); 52 console.log(event);
53 if (event.type == "postback") { 53 if (event.type == "postback") {
54 - if (event.postback.data == "new") { 54 + if (event.postback.data == "newKeyword") {
55 var found = waitNewMamulList.indexOf(event.source.userId); 55 var found = waitNewMamulList.indexOf(event.source.userId);
56 if (found == -1) { 56 if (found == -1) {
57 waitNewMamulList.push(event.source.userId); 57 waitNewMamulList.push(event.source.userId);
...@@ -74,6 +74,14 @@ function handleEvent(event) { ...@@ -74,6 +74,14 @@ function handleEvent(event) {
74 return Promise.resolve( 74 return Promise.resolve(
75 checkMamul(client, event.source.userId), 75 checkMamul(client, event.source.userId),
76 ); 76 );
77 + } else if (event.postback.data == "deleteKeyword") {
78 + return Promise.resolve(
79 + console.log("키워드 삭제")
80 + )
81 + } else if (event.postback.data == "checkKeywords") {
82 + return Promise.resolve(
83 + console.log("키워드 확인")
84 + )
77 } 85 }
78 } 86 }
79 return Promise.resolve(null); 87 return Promise.resolve(null);
...@@ -172,8 +180,8 @@ module.exports = { handleEvent, config }; ...@@ -172,8 +180,8 @@ module.exports = { handleEvent, config };
172 // }, 180 // },
173 // action: { 181 // action: {
174 // type: "postback", 182 // type: "postback",
175 -// label: "new", 183 +// label: "newKeyword",
176 -// data: "new", 184 +// data: "newKeyword",
177 // displayText: "키워드 추가", 185 // displayText: "키워드 추가",
178 // inputOption: "openKeyboard", 186 // inputOption: "openKeyboard",
179 // fillInText: "", 187 // fillInText: "",
...@@ -188,8 +196,8 @@ module.exports = { handleEvent, config }; ...@@ -188,8 +196,8 @@ module.exports = { handleEvent, config };
188 // }, 196 // },
189 // action: { 197 // action: {
190 // type: "postback", 198 // type: "postback",
191 -// label: "check", 199 +// label: "deleteKeyword",
192 -// data: "check", 200 +// data: "deleteKeyword",
193 // displayText: "키워드 삭제", 201 // displayText: "키워드 삭제",
194 // inputOption: "openKeyboard", 202 // inputOption: "openKeyboard",
195 // fillInText: "", 203 // fillInText: "",
...@@ -204,8 +212,8 @@ module.exports = { handleEvent, config }; ...@@ -204,8 +212,8 @@ module.exports = { handleEvent, config };
204 // }, 212 // },
205 // action: { 213 // action: {
206 // type: "postback", 214 // type: "postback",
207 -// label: "checkKeyword", 215 +// label: "checkKeywords",
208 -// data: "checkKeyword", 216 +// data: "checkKeywords",
209 // displayText: "키워드 확인", 217 // displayText: "키워드 확인",
210 // }, 218 // },
211 // }, 219 // },
...@@ -225,13 +233,13 @@ module.exports = { handleEvent, config }; ...@@ -225,13 +233,13 @@ module.exports = { handleEvent, config };
225 // }, 233 // },
226 // ], 234 // ],
227 // }; 235 // };
228 -
229 // 등록 236 // 등록
230 // client.createRichMenu(richMenu).then((richMenuId) => { 237 // client.createRichMenu(richMenu).then((richMenuId) => {
231 // console.log(richMenuId) 238 // console.log(richMenuId)
232 // }); 239 // });
233 // client.setRichMenuImage( 240 // client.setRichMenuImage(
234 -// "richmenu-754798c14b181701c64cd7f0d37f52ec", 241 +// "richmenu-ab4bba1c3c9235be50e3e8924fabd940",
235 -// fs.createReadStream("./static/img/richMenu.png") 242 +// fs.createReadStream("./static/image/richMenu.png")
236 // ); 243 // );
237 -//client.setDefaultRichMenu("richmenu-754798c14b181701c64cd7f0d37f52ec"); 244 +// client.setDefaultRichMenu("richmenu-ab4bba1c3c9235be50e3e8924fabd940");
245 +//
......