diff --git a/appinfo/routes.php b/appinfo/routes.php index 6affc74..7e77f72 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -34,6 +34,7 @@ return [ ['name' => 'page#index', 'url' => '/new', 'verb' => 'GET', 'postfix' => 'new'], ['name' => 'page#index', 'url' => '/favorites', 'verb' => 'GET', 'postfix' => 'favorites'], ['name' => 'page#index', 'url' => '/categories', 'verb' => 'GET', 'postfix' => 'categories'], + ['name' => 'page#index', 'url' => '/search', 'verb' => 'GET', 'postfix' => 'search'], // Settings ['name' => 'settings#set_menu_state', 'url' => '/settings/menuState', 'verb' => 'POST'], ['name' => 'settings#get_menu_state', 'url' => '/settings/menuState', 'verb' => 'GET'], diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 3383c2f..a8d7cdc 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -80,7 +80,7 @@ class SettingsController extends ApiController { public function setMenuState($menuState = ""): JSONResponse { $legalArguments = ['TOP', 'RECENT', 'NEW', 'FAVORITES', 'CATEGORIES']; if (!in_array($menuState, $legalArguments)) { - return new JSONResponse(['status' => 'error'], Http::STATUS_BAD_REQUEST); + $menuState = 'TOP'; } return $this->setSetting( 'menuState', diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index f1b16e5..8767e2b 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -21,6 +21,10 @@ :to="{ name: 'CATEGORIES' }" icon="icon-files-dark" :title="t('radio', 'Categories')" /> +