Auto commit for release 'develop' on 2025-01-26

This commit is contained in:
github-actions
2025-01-26 14:33:19 +01:00
parent 8a6eaad2bb
commit 5e15747a5b
35 changed files with 609 additions and 612 deletions

View File

@@ -39,7 +39,7 @@ class DestroyController extends Controller
{
use ValidatesUserGroupTrait;
protected array $acceptedRoles = [UserRoleEnum::OWNER];
protected array $acceptedRoles = [UserRoleEnum::OWNER];
public const string RESOURCE_KEY = 'exchange-rates';
@@ -61,7 +61,7 @@ class DestroyController extends Controller
public function destroy(DestroyRequest $request, TransactionCurrency $from, TransactionCurrency $to): JsonResponse
{
$date = $request->getDate();
if(null === $date) {
if (null === $date) {
throw new ValidationException('Date is required');
}
$rate = $this->repository->getSpecificRateOnDate($from, $to, $date);

View File

@@ -77,12 +77,12 @@ class ShowController extends Controller
public function showSingle(CurrencyExchangeRate $exchangeRate): JsonResponse
{
$transformer = new ExchangeRateTransformer();
$transformer = new ExchangeRateTransformer();
$transformer->setParameters($this->parameters);
return response()
->api($this->jsonApiObject(self::RESOURCE_KEY, $exchangeRate, $transformer))
->header('Content-Type', self::CONTENT_TYPE)
;
;
}
}