오윤석

Merge branch 'hotfix' into release

......@@ -119,6 +119,12 @@ const getCharacterInfo = async function(nickname, characterCode) {
}
});
stats.major = 0;
if (stats.major == 0) {
throw new Error("no_major_stats")
}
return {
character: character,
stats: stats
......@@ -129,6 +135,8 @@ const getCharacterInfo = async function(nickname, characterCode) {
return -1;
else if (error.message == "game_checking")
return -2;
else if (error.message == "no_major_stats")
return -3;
else
return -999;
}
......
......@@ -28,6 +28,10 @@ module.exports = {
// 점검중
res.status(503).send();
return;
} else if (characterInfo == -3) {
// 데이터를 받아오지 못함
res.status(502).send();
return;
} else if (characterInfo < 0) {
res.status(400).send();
return;
......
......@@ -125,6 +125,9 @@
window.open("https://maplestory.nexon.com/MyMaple/Account/Character/Visibility");
}, 2000);
break;
case 502:
M.toast({html:"메이플스토리로부터 데이터를 받아오지 못했습니다.<br><br>잠시 후에 시도해주세요."});
break;
case 503:
M.toast({html:"메이플스토리가 점검중입니다."});
break;
......