Skip to content

Commit

Permalink
Merge pull request #867 from bakaphp/kaioken-patch-1
Browse files Browse the repository at this point in the history
Update AppsSettingsController.php
  • Loading branch information
kaioken authored May 10, 2024
2 parents 403e766 + 69c44ea commit 1af378f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Api/Controllers/AppsSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function processOutput($results)
$this->dtoConfig->registerMapping(Apps::class, AppsSettings::class)
->forMember('settings', function (Apps $app) {
$settings = [];
foreach ($app->settingsApp->toArray() as $setting) {
foreach ($app->getSettingsApp('is_public = 1')->toArray() as $setting) {
$settings[$setting['name']] = $setting['value'];
}
return $settings;
Expand All @@ -79,7 +79,7 @@ public function getByKey($key = null) : Response
{
//find the info
$record = $this->model->findFirstOrFail([
'key = ?0 AND is_deleted = 0',
'key = ?0 AND is_deleted = 0 AND is_public = 1',
'bind' => [$key],
]);

Expand Down

0 comments on commit 1af378f

Please sign in to comment.