ShinSeungMin

Solve conflict

......@@ -106,7 +106,6 @@ exports.geting_PlayingMovie= async() => {
let n = 0;
console.log(movie_list);
for (item of movie_list) {
console.log(item.getAttribute('form-at'))
movie_data[n++]['running'] = await item.getAttribute('form-at');
}
console.log("Completed get Running");
......
......@@ -153,6 +153,11 @@ app.post('/hook', asyncHandler(async (req, res, next) => {
console.log(MEGA_PlayingMovieURL, megabox.movie_data);
MEGA_flag = 4;
}
else{
const text1 = "영화를 보실 날짜를 다시 입력해주세요.";
const text2 = "ex)20020409";
SendMessage(eventObj, text1, text2);
}
//원본 코드
// MEGA_date = parseInt(eventObj.message.text);
// if (MEGA_date && MEGA_TheaterLocationCode) {
......@@ -179,15 +184,15 @@ app.post('/hook', asyncHandler(async (req, res, next) => {
MEGA_PlayingMovieList[movietitle] = megabox.movie_data[n].movie_num;
}
}
console.log(Object.keys(megabox.movie_data).length);
if (Object.keys(megabox.movie_data).length == 0) {
PushMessage("현재상영작이 없습니다.","영화관 선택 단계로 이동합니다.");
console.log(Object.keys(MEGA_PlayingMovieList).length);
if (Object.keys(MEGA_PlayingMovieList).length == 0) {
PushSingleMessage("현재상영작이 없습니다.\n영화관 선택 단계로 이동합니다.");
setTimeout(function () {
PushMessage("영화관 위치를 입력해주세요", "ex1)강남");
}, 1000);
MEGA_flag = 1;
}else if (Object.keys(MEGA_PlayingMovieList).length == 1) {
PlayingMovie += '1. ' + Object.keys(MEGA_PlayingMovieList)[0];
PlayingMovie += '1: ' + Object.keys(MEGA_PlayingMovieList)[0];
PushMessage(PlayingMovie, "바로 링크가 보내집니다.");
MEGA_title = MEGA_PlayingMovieList[Object.keys(MEGA_PlayingMovieList)[0]];
setTimeout(function () {
......@@ -252,7 +257,6 @@ try {
console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
console.log(error);
}
//오늘 날짜 구하기
function GettingToday(){
var today = new Date();
......@@ -401,4 +405,4 @@ function PushURLMessage(pcurl, smartphoneurl) {//push single message
}, (error, response, body) => {
console.log(body)
});
}
\ No newline at end of file
}
......