Skip to content

Commit

Permalink
Update AppsSettingsController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kaioken authored May 10, 2024
1 parent 403e766 commit 69c44ea
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 69c44ea

Please sign in to comment.