diff --git a/hwe/sammo/API/Betting/Bet.php b/hwe/sammo/API/Betting/Bet.php index c5ffaec6..40bb3d81 100644 --- a/hwe/sammo/API/Betting/Bet.php +++ b/hwe/sammo/API/Betting/Bet.php @@ -39,7 +39,7 @@ class Bet extends \sammo\BaseAPI public function getRequiredSessionMode(): int { - return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY; + return static::REQ_GAME_LOGIN; } public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag) diff --git a/hwe/sammo/API/Betting/GetBettingDetail.php b/hwe/sammo/API/Betting/GetBettingDetail.php index 78e87507..99548309 100644 --- a/hwe/sammo/API/Betting/GetBettingDetail.php +++ b/hwe/sammo/API/Betting/GetBettingDetail.php @@ -38,7 +38,6 @@ class GetBettingDetail extends \sammo\BaseAPI { $db = DB::db(); - increaseRefresh("국가베팅장", 1); /** @var int */ $bettingID = $this->args['betting_id']; diff --git a/hwe/sammo/API/Betting/GetBettingList.php b/hwe/sammo/API/Betting/GetBettingList.php index df89dc55..57a25fbf 100644 --- a/hwe/sammo/API/Betting/GetBettingList.php +++ b/hwe/sammo/API/Betting/GetBettingList.php @@ -36,7 +36,7 @@ class GetBettingList extends \sammo\BaseAPI $me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,penalty,permission FROM general WHERE owner=%i', $userID); $con = checkLimit($me['con']); if ($con >= 2) { - return "접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 갱신 가능 시각 : {$me['turntime']})"; + return "접속 제한중입니다."; } $bettingList = []; @@ -47,6 +47,17 @@ class GetBettingList extends \sammo\BaseAPI $bettingList[$item->id]['totalAmount'] = 0; } + [$year, $month] = $gameStor->getValuesAsArray(['year', 'month']); + + if(!$bettingList){ + return [ + 'result' => true, + 'bettingList' => $bettingList, + 'year' => $year, + 'month' => $month, + ]; + } + $bettingIDList = array_keys($bettingList); // XXX: query cache만 믿고 sum을 하는 짓을 벌여도 되는가? foreach ($db->queryAllLists( @@ -59,7 +70,6 @@ class GetBettingList extends \sammo\BaseAPI $bettingList[$bettingID]['totalAmount'] = $totalAmount; } - [$year, $month] = $gameStor->getValuesAsArray(['year', 'month']); return [ 'result' => true,