mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
Remove checks for null
This commit is contained in:
@@ -38,8 +38,8 @@ class CurrencyTransformer extends AbstractTransformer
|
||||
{
|
||||
return [
|
||||
'id' => $currency->id,
|
||||
'created_at' => $currency->created_at?->toAtomString(),
|
||||
'updated_at' => $currency->updated_at?->toAtomString(),
|
||||
'created_at' => $currency->created_at->toAtomString(),
|
||||
'updated_at' => $currency->updated_at->toAtomString(),
|
||||
'native' => $currency->userGroupNative,
|
||||
'default' => $currency->userGroupNative,
|
||||
'primary' => $currency->userGroupNative,
|
||||
|
||||
@@ -51,8 +51,8 @@ class ObjectGroupTransformer extends AbstractTransformer
|
||||
|
||||
return [
|
||||
'id' => (string) $objectGroup->id,
|
||||
'created_at' => $objectGroup->created_at?->toAtomString(),
|
||||
'updated_at' => $objectGroup->updated_at?->toAtomString(),
|
||||
'created_at' => $objectGroup->created_at->toAtomString(),
|
||||
'updated_at' => $objectGroup->updated_at->toAtomString(),
|
||||
'title' => $objectGroup->title,
|
||||
'order' => $objectGroup->order,
|
||||
'links' => [['rel' => 'self', 'uri' => '/object_groups/'.$objectGroup->id]],
|
||||
|
||||
@@ -66,8 +66,8 @@ class PiggyBankEventTransformer extends AbstractTransformer
|
||||
|
||||
return [
|
||||
'id' => (string) $event->id,
|
||||
'created_at' => $event->created_at?->toAtomString(),
|
||||
'updated_at' => $event->updated_at?->toAtomString(),
|
||||
'created_at' => $event->created_at->toAtomString(),
|
||||
'updated_at' => $event->updated_at->toAtomString(),
|
||||
'amount' => $amount,
|
||||
'pc_amount' => $primaryAmount,
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ class PreferenceTransformer extends AbstractTransformer
|
||||
|
||||
return [
|
||||
'id' => $preference->id,
|
||||
'created_at' => $preference->created_at?->toAtomString(),
|
||||
'updated_at' => $preference->updated_at?->toAtomString(),
|
||||
'created_at' => $preference->created_at->toAtomString(),
|
||||
'updated_at' => $preference->updated_at->toAtomString(),
|
||||
'user_group_id' => $userGroupId,
|
||||
'name' => $preference->name,
|
||||
'data' => $preference->data,
|
||||
|
||||
@@ -132,6 +132,7 @@ $app = Application::configure(basePath: dirname(__DIR__))
|
||||
AcceptHeaders::class,
|
||||
EnsureFrontendRequestsAreStateful::class,
|
||||
'auth:api',
|
||||
Binder::class,
|
||||
]
|
||||
);
|
||||
$middleware->appendToGroup('api_basic', [AcceptHeaders::class, Binder::class]);
|
||||
|
||||
Reference in New Issue
Block a user