From 245d363c99b45d522148cdf4e34742a2d48e5718 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 27 Feb 2023 01:21:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20GetFrontInfo=EC=97=90=20permission=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=8F=AC=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/General/GetFrontInfo.php | 5 +++++ hwe/ts/defs/API/Global.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/hwe/sammo/API/General/GetFrontInfo.php b/hwe/sammo/API/General/GetFrontInfo.php index 054a1fcb..c3f18991 100644 --- a/hwe/sammo/API/General/GetFrontInfo.php +++ b/hwe/sammo/API/General/GetFrontInfo.php @@ -26,6 +26,7 @@ use function sammo\checkLimit; use function sammo\getTournamentTermText; use function sammo\buildNationTypeClass; use function sammo\calcLeadershipBonus; +use function sammo\checkSecretPermission; use function sammo\getBillByLevel; use function sammo\getDed; use function sammo\getHonor; @@ -244,6 +245,8 @@ class GetFrontInfo extends \sammo\BaseAPI public function generateGeneralInfo(MeekroDB $db, General $general, array $rawNation): array { + $permission = checkSecretPermission($general->getRaw()); + $result = [ 'no' => $general->getID(), // number; 'name' => $general->getName(), // string; @@ -318,6 +321,8 @@ class GetFrontInfo extends \sammo\BaseAPI 'deathcrew' => $general->getRankVar(RankColumn::deathcrew), // number; 'firenum' => $general->getRankVar(RankColumn::firenum), // number; //P1 End + + 'permission' => $permission, ]; $nationID = $general->getNationID(); diff --git a/hwe/ts/defs/API/Global.ts b/hwe/ts/defs/API/Global.ts index b7c90451..9bd1f8be 100644 --- a/hwe/ts/defs/API/Global.ts +++ b/hwe/ts/defs/API/Global.ts @@ -133,6 +133,7 @@ export type GetFrontInfoResponse = { lastVote: VoteInfo | null; }; general: GeneralListItemP1 & { + permission: number; troopInfo?: { leader: { city: number;