Rename "native" references to "primary" or "pc".

This commit is contained in:
James Cole
2025-07-31 20:47:20 +02:00
parent d6d9f665c7
commit da36d84b79
25 changed files with 146 additions and 154 deletions

View File

@@ -108,7 +108,7 @@ class ListController extends Controller
$admin = auth()->user();
$enrichment = new AccountEnrichment();
$enrichment->setUser($admin);
$enrichment->setNative($this->primaryCurrency);
$enrichment->setPrimary($this->primaryCurrency);
$accounts = $enrichment->enrich($accounts);
// make paginator:
@@ -188,8 +188,8 @@ class ListController extends Controller
$admin = auth()->user();
$enrichment = new SubscriptionEnrichment();
$enrichment->setUser($admin);
$enrichment->setConvertToNative($this->convertToPrimary);
$enrichment->setNative($this->primaryCurrency);
$enrichment->setConvertToPrimary($this->convertToPrimary);
$enrichment->setPrimary($this->primaryCurrency);
$enrichment->setStart($this->parameters->get('start'));
$enrichment->setEnd($this->parameters->get('end'));
$bills = $enrichment->enrichSingle($bills);

View File

@@ -107,7 +107,7 @@ class ShowController extends Controller
/** @var User $user */
$user = auth()->user();
$manager = $this->getManager();
$this->parameters->set('nativeCurrency', $this->primaryCurrency);
$this->parameters->set('primaryCurrency', $this->primaryCurrency);
// update fields with user info.
$currency->refreshForUser($user);
@@ -122,9 +122,6 @@ class ShowController extends Controller
}
/**
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/currencies/getNativeCurrency
*
* Show a currency.
*
* @throws FireflyException

View File

@@ -99,11 +99,6 @@ class UpdateController extends Controller
}
/**
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/currencies/nativeCurrency
*
* Make the currency a default currency.
*
* @throws FireflyException
*/
public function makeDefault(TransactionCurrency $currency): JsonResponse