Toggle dashboard editor without refresh (#11455)

also removes needless route
This commit is contained in:
Tony Murray
2020-04-24 22:29:44 -05:00
committed by GitHub
parent c31d58f9bb
commit fc0c357b23
4 changed files with 117 additions and 102 deletions

View File

@@ -123,13 +123,6 @@ class UserPreferencesController extends Controller
return response()->json(['status' => 'success']);
}
public function toggleDashboardEditor(Request $request)
{
$hide_dashboard_editor = UserPref::getPref(Auth::user(), 'hide_dashboard_editor') ? 0 : 1;
UserPref::setPref(Auth::user(), 'hide_dashboard_editor', $hide_dashboard_editor);
return redirect('overview');
}
private function getValidLocales()
{
return array_reduce(glob(resource_path('lang') . '/*', GLOB_ONLYDIR), function ($locales, $locale) {