김준서

Edit Showmenu function

Showing 1 changed file with 3 additions and 5 deletions
...@@ -28,7 +28,7 @@ const user_id = config.USER_ID; ...@@ -28,7 +28,7 @@ const user_id = config.USER_ID;
28 28
29 29
30 // SHOW MENU 30 // SHOW MENU
31 -function ShowMenu() { 31 +function ShowMenu(replyeToken) {
32 request.post({ 32 request.post({
33 url: LINE_URL + '/push', 33 url: LINE_URL + '/push',
34 headers: { 34 headers: {
...@@ -48,8 +48,6 @@ function ShowMenu() { ...@@ -48,8 +48,6 @@ function ShowMenu() {
48 }); 48 });
49 } 49 }
50 50
51 -ShowMenu();
52 -
53 51
54 // RECEIVE MESSAGE 52 // RECEIVE MESSAGE
55 app.post('/hook', function (req, res) { 53 app.post('/hook', function (req, res) {
...@@ -71,7 +69,7 @@ function Response(replyToken, message) { ...@@ -71,7 +69,7 @@ function Response(replyToken, message) {
71 MovieInfo.MovieInfo(replyToken, message); 69 MovieInfo.MovieInfo(replyToken, message);
72 } 70 }
73 else if (message == '0' || message == '0번') { 71 else if (message == '0' || message == '0번') {
74 - ShowMenu(); 72 + ShowMenu(replyeToken);
75 } 73 }
76 else if (message == '1' || message == '1번') { 74 else if (message == '1' || message == '1번') {
77 BoxOffice.ShowYesterdayRank(replyToken); 75 BoxOffice.ShowYesterdayRank(replyToken);
...@@ -94,7 +92,7 @@ function Response(replyToken, message) { ...@@ -94,7 +92,7 @@ function Response(replyToken, message) {
94 } 92 }
95 else { 93 else {
96 Exception.SayIDontKnow(replyToken); 94 Exception.SayIDontKnow(replyToken);
97 - ShowMenu(); 95 + ShowMenu(replyeToken);
98 } 96 }
99 } 97 }
100 98
......