Remove unnecessary readableLink settings

This commit is contained in:
2024-09-11 13:55:55 +02:00
parent 4b084f7bce
commit 4b33881f15
3 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -14,7 +14,6 @@ use Symfony\Component\Validator\Constraints as Assert;
* Accountings are the receivers and the issuers of Transactions.
*/
#[ORM\Entity(repositoryClass: AccountingRepository::class)]
#[API\ApiResource]
#[API\Get()]
#[API\Patch(security: 'is_granted("ACCOUNTING_EDIT", object)')]
class Accounting
@@ -48,11 +47,11 @@ class Accounting
#[ORM\OneToOne(mappedBy: 'accounting', cascade: ['persist', 'remove'])]
private ?Tipjar $tipjar = null;
#[API\ApiProperty(writable: false, readableLink: false)]
#[API\ApiProperty(writable: false)]
#[ORM\OneToMany(mappedBy: 'origin', targetEntity: AccountingTransaction::class)]
private Collection $transactionsIssued;
#[API\ApiProperty(writable: false, readableLink: false)]
#[API\ApiProperty(writable: false)]
#[ORM\OneToMany(mappedBy: 'target', targetEntity: AccountingTransaction::class)]
private Collection $transactionsReceived;
@@ -172,7 +171,6 @@ class Accounting
/**
* @return Collection<int, AccountingTransaction>
*/
#[API\ApiProperty(readableLink: false)]
public function getTransactions(): Collection
{
$transactions = [
+2 -1
View File
@@ -38,6 +38,7 @@ class GatewayCharge
/**
* The Accounting receiving the consequent Transaction for this GatewayCharge.
*/
#[API\ApiProperty(readableLink: true)]
#[Assert\NotBlank()]
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
@@ -46,7 +47,7 @@ class GatewayCharge
/**
* The AccountingTransaction generated for this charge after the checkout with the Gateway.
*/
#[API\ApiProperty(writable: false, readableLink: false)]
#[API\ApiProperty(writable: false)]
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?AccountingTransaction $transaction = null;
-1
View File
@@ -50,7 +50,6 @@ class GatewayCheckout
*/
#[Assert\NotBlank()]
#[Assert\Count(min: 1)]
#[API\ApiProperty(readableLink: true, writableLink: true)]
#[ORM\ManyToMany(targetEntity: GatewayCharge::class, cascade: ['persist'])]
private Collection $charges;