diff --git a/app/Classes/Settings/Language.php b/app/Classes/Settings/Language.php index eb956595..5f9b87fe 100644 --- a/app/Classes/Settings/Language.php +++ b/app/Classes/Settings/Language.php @@ -21,7 +21,7 @@ class Language { $validator = Validator::make($request->all(), [ 'autotranslate' => 'string', - 'canClientChangeLanguage' => 'boolean', + 'canClientChangeLanguage' => 'string', 'defaultLanguage' => 'required|string', 'languages' => 'required|array', 'languages.*' => 'required|string', diff --git a/app/Classes/Settings/Payments.php b/app/Classes/Settings/Payments.php index 197515e6..262e2886 100644 --- a/app/Classes/Settings/Payments.php +++ b/app/Classes/Settings/Payments.php @@ -29,7 +29,6 @@ class Payments "stripe-methods" => "nullable|string", "sales-tax" => "nullable|numeric", ]); - if ($validator->fails()) { return redirect(route('admin.settings.index') . '#payment')->with('error', __('Payment settings have not been updated!'))->withErrors($validator) ->withInput(); @@ -46,7 +45,7 @@ class Payments "SETTINGS::PAYMENTS:STRIPE:TEST_SECRET" => "stripe-test-secret", "SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET" => "stripe-endpoint-test-secret", "SETTINGS::PAYMENTS:STRIPE:METHODS" => "stripe-methods", - "SETTINGS::PAYMENTS:SALES_TAX" => "sales_tax" + "SETTINGS::PAYMENTS:SALES_TAX" => "sales-tax" ]; @@ -57,7 +56,6 @@ class Payments Cache::forget("setting" . ':' . $key); } - return redirect(route('admin.settings.index') . '#payment')->with('success', __('Payment settings updated!')); } } diff --git a/app/Classes/Settings/System.php b/app/Classes/Settings/System.php index a159132a..da6c6856 100644 --- a/app/Classes/Settings/System.php +++ b/app/Classes/Settings/System.php @@ -21,12 +21,12 @@ class System public function updateSettings(Request $request) { $validator = Validator::make($request->all(), [ - "register-ip-check" => "boolean", - "server-create-charge-first-hour" => "boolean", + "register-ip-check" => "string", + "server-create-charge-first-hour" => "string", "credits-display-name" => "required|string", "allocation-limit" => "required|min:0|integer", - "force-email-verification" => "boolean", - "force-discord-verification" => "boolean", + "force-email-verification" => "string", + "force-discord-verification" => "string", "initial-credits" => "required|min:0|integer", "initial-server-limit" => "required|min:0|integer", "credits-reward-amount-discord" => "required|min:0|integer", @@ -35,7 +35,6 @@ class System "server-limit-email" => "required|min:0|integer", ]); - if ($validator->fails()) { return redirect(route('admin.settings.index') . '#system')->with('error', __('System settings have not been updated!'))->withErrors($validator) ->withInput();