Skip to content

Commit 2118f9c

Browse files
committed
Merge defaults recursively
For #195
1 parent 85bcb75 commit 2118f9c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Endpoint configs are now merged into the `defaults` array recursively, making it possible to specify default criteria params. ([#195](https://github.com/craftcms/element-api/issues/195))
56
- Fixed an error that occurred if no cache tags were registered by an endpoint’s element query. ([#196](https://github.com/craftcms/element-api/issues/196))
67

78
## 4.1.0 - 2024-03-14

src/controllers/DefaultController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function actionIndex(string $pattern): Response
8383

8484
if (is_array($config)) {
8585
// Merge in the defaults
86-
$config = array_merge($plugin->getDefaultResourceAdapterConfig(), $config);
86+
$config = ArrayHelper::merge($plugin->getDefaultResourceAdapterConfig(), $config);
8787
}
8888

8989
// Prevent API endpoints from getting indexed

0 commit comments

Comments
 (0)