Fix Settings bool -> String (#828)
This commit is contained in:
commit
f1d5856bba
|
@ -8,11 +8,11 @@ class GeneralSettings extends Settings
|
||||||
{
|
{
|
||||||
public bool $store_enabled;
|
public bool $store_enabled;
|
||||||
public string $credits_display_name;
|
public string $credits_display_name;
|
||||||
public ?bool $recaptcha_enabled;
|
public bool $recaptcha_enabled;
|
||||||
public ?string $recaptcha_site_key;
|
public ?string $recaptcha_site_key;
|
||||||
public ?string $recaptcha_secret_key;
|
public ?string $recaptcha_secret_key;
|
||||||
public ?string $phpmyadmin_url;
|
public ?string $phpmyadmin_url;
|
||||||
public ?bool $alert_enabled;
|
public bool $alert_enabled;
|
||||||
public string $alert_type;
|
public string $alert_type;
|
||||||
public ?string $alert_message;
|
public ?string $alert_message;
|
||||||
public string $theme;
|
public string $theme;
|
||||||
|
@ -33,13 +33,13 @@ class GeneralSettings extends Settings
|
||||||
public static function getValidations()
|
public static function getValidations()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'store_enabled' => 'boolean',
|
'store_enabled' => 'nullable|string',
|
||||||
'credits_display_name' => 'required|string',
|
'credits_display_name' => 'required|string',
|
||||||
'recaptcha_enabled' => 'nullable|boolean',
|
'recaptcha_enabled' => 'nullable|string',
|
||||||
'recaptcha_site_key' => 'nullable|string',
|
'recaptcha_site_key' => 'nullable|string',
|
||||||
'recaptcha_secret_key' => 'nullable|string',
|
'recaptcha_secret_key' => 'nullable|string',
|
||||||
'phpmyadmin_url' => 'nullable|string',
|
'phpmyadmin_url' => 'nullable|string',
|
||||||
'alert_enabled' => 'nullable|boolean',
|
'alert_enabled' => 'nullable|string',
|
||||||
'alert_type' => 'required|in:primary,secondary,success,danger,warning,info',
|
'alert_type' => 'required|in:primary,secondary,success,danger,warning,info',
|
||||||
'alert_message' => 'nullable|string',
|
'alert_message' => 'nullable|string',
|
||||||
'theme' => 'required|in:default,BlueInfinity' // TODO: themes should be made/loaded dynamically
|
'theme' => 'required|in:default,BlueInfinity' // TODO: themes should be made/loaded dynamically
|
||||||
|
|
|
@ -33,7 +33,7 @@ class InvoiceSettings extends Settings
|
||||||
'company_phone' => 'nullable|string',
|
'company_phone' => 'nullable|string',
|
||||||
'company_vat' => 'nullable|string',
|
'company_vat' => 'nullable|string',
|
||||||
'company_website' => 'nullable|string',
|
'company_website' => 'nullable|string',
|
||||||
'enabled' => 'nullable|boolean',
|
'enabled' => 'nullable|string',
|
||||||
'prefix' => 'nullable|string',
|
'prefix' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@ class LocaleSettings extends Settings
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'available' => 'nullable|array',
|
'available' => 'nullable|array',
|
||||||
'clients_can_change' => 'nullable|boolean',
|
'clients_can_change' => 'nullable|string',
|
||||||
'datatables' => 'nullable|string',
|
'datatables' => 'nullable|string',
|
||||||
'default' => 'required|in:' . implode(',', config('app.available_locales')),
|
'default' => 'required|in:' . implode(',', config('app.available_locales')),
|
||||||
'dynamic' => 'nullable|boolean',
|
'dynamic' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class MailSettings extends Settings
|
||||||
'mail_from_address' => 'nullable|string',
|
'mail_from_address' => 'nullable|string',
|
||||||
'mail_from_name' => 'nullable|string',
|
'mail_from_name' => 'nullable|string',
|
||||||
'mail_mailer' => 'nullable|string',
|
'mail_mailer' => 'nullable|string',
|
||||||
'mail_enabled' => 'nullable|boolean',
|
'mail_enabled' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ class ReferralSettings extends Settings
|
||||||
public static function getValidations()
|
public static function getValidations()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'always_give_commission' => 'nullable|boolean',
|
'always_give_commission' => 'nullable|string',
|
||||||
'enabled' => 'nullable|boolean',
|
'enabled' => 'nullable|string',
|
||||||
'reward' => 'nullable|numeric',
|
'reward' => 'nullable|numeric',
|
||||||
'mode' => 'required|in:comission,sign-up,both',
|
'mode' => 'required|in:comission,sign-up,both',
|
||||||
'percentage' => 'nullable|numeric',
|
'percentage' => 'nullable|numeric',
|
||||||
|
|
|
@ -24,9 +24,9 @@ class ServerSettings extends Settings
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'allocation_limit' => 'required|integer|min:0',
|
'allocation_limit' => 'required|integer|min:0',
|
||||||
'creation_enabled' => 'nullable|boolean',
|
'creation_enabled' => 'nullable|string',
|
||||||
'enable_upgrade' => 'nullable|boolean',
|
'enable_upgrade' => 'nullable|string',
|
||||||
'charge_first_hour' => 'nullable|boolean',
|
'charge_first_hour' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class TicketSettings extends Settings
|
||||||
public static function getValidations()
|
public static function getValidations()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'enabled' => 'nullable|boolean',
|
'enabled' => 'nullable|string',
|
||||||
'information' => 'nullable|string',
|
'information' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,16 +33,16 @@ class UserSettings extends Settings
|
||||||
return [
|
return [
|
||||||
'credits_reward_after_verify_discord' => 'required|numeric',
|
'credits_reward_after_verify_discord' => 'required|numeric',
|
||||||
'credits_reward_after_verify_email' => 'required|numeric',
|
'credits_reward_after_verify_email' => 'required|numeric',
|
||||||
'force_discord_verification' => 'nullable|boolean',
|
'force_discord_verification' => 'nullable|string',
|
||||||
'force_email_verification' => 'nullable|boolean',
|
'force_email_verification' => 'nullable|string',
|
||||||
'initial_credits' => 'required|numeric',
|
'initial_credits' => 'required|numeric',
|
||||||
'initial_server_limit' => 'required|numeric',
|
'initial_server_limit' => 'required|numeric',
|
||||||
'min_credits_to_make_server' => 'required|numeric',
|
'min_credits_to_make_server' => 'required|numeric',
|
||||||
'server_limit_after_irl_purchase' => 'required|numeric',
|
'server_limit_after_irl_purchase' => 'required|numeric',
|
||||||
'server_limit_after_verify_discord' => 'required|numeric',
|
'server_limit_after_verify_discord' => 'required|numeric',
|
||||||
'server_limit_after_verify_email' => 'required|numeric',
|
'server_limit_after_verify_email' => 'required|numeric',
|
||||||
'register_ip_check' => 'nullable|boolean',
|
'register_ip_check' => 'nullable|string',
|
||||||
'creation_enabled' => 'nullable|boolean',
|
'creation_enabled' => 'nullable|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,13 @@ class WebsiteSettings extends Settings
|
||||||
public static function getValidations()
|
public static function getValidations()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'motd_enabled' => 'nullable|boolean',
|
'motd_enabled' => 'nullable|string',
|
||||||
'motd_message' => 'nullable|string',
|
'motd_message' => 'nullable|string',
|
||||||
'show_imprint' => 'nullable|boolean',
|
'show_imprint' => 'nullable|string',
|
||||||
'show_privacy' => 'nullable|boolean',
|
'show_privacy' => 'nullable|string',
|
||||||
'show_tos' => 'nullable|boolean',
|
'show_tos' => 'nullable|string',
|
||||||
'useful_links_enabled' => 'nullable|boolean',
|
'useful_links_enabled' => 'nullable|string',
|
||||||
'enable_login_logo' => 'nullable|boolean',
|
'enable_login_logo' => 'nullable|string',
|
||||||
'seo_title' => 'nullable|string',
|
'seo_title' => 'nullable|string',
|
||||||
'seo_description' => 'nullable|string',
|
'seo_description' => 'nullable|string',
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue