feat: GetFrontInfo에 permission 정보 포함

This commit is contained in:
2023-03-09 02:20:14 +09:00
parent e7e9ba2201
commit 245d363c99
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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();
+1
View File
@@ -133,6 +133,7 @@ export type GetFrontInfoResponse = {
lastVote: VoteInfo | null;
};
general: GeneralListItemP1 & {
permission: number;
troopInfo?: {
leader: {
city: number;