diff --git a/app/Settings/DiscordSettings.php b/app/Settings/DiscordSettings.php index 4788ae7e..79981c71 100644 --- a/app/Settings/DiscordSettings.php +++ b/app/Settings/DiscordSettings.php @@ -18,8 +18,6 @@ class DiscordSettings extends Settings return 'discord'; } - - /** * Summary of validations array * @return array diff --git a/app/Settings/MailSettings.php b/app/Settings/MailSettings.php index 90b5a328..c3a9a367 100644 --- a/app/Settings/MailSettings.php +++ b/app/Settings/MailSettings.php @@ -20,7 +20,12 @@ class MailSettings extends Settings return 'mail'; } - + public static function encrypted(): array + { + return [ + 'mail_password', + ]; + } public function setConfig() { diff --git a/app/Settings/PterodactylSettings.php b/app/Settings/PterodactylSettings.php index 3e888b93..c9693386 100644 --- a/app/Settings/PterodactylSettings.php +++ b/app/Settings/PterodactylSettings.php @@ -16,7 +16,13 @@ class PterodactylSettings extends Settings return 'pterodactyl'; } - + public static function encrypted(): array + { + return [ + 'admin_token', + 'user_token', + ]; + } /** * Get url with ensured ending backslash diff --git a/database/settings/2023_02_01_181334_create_pterodactyl_settings.php b/database/settings/2023_02_01_181334_create_pterodactyl_settings.php index 1bf0c7c0..dbbb93b6 100644 --- a/database/settings/2023_02_01_181334_create_pterodactyl_settings.php +++ b/database/settings/2023_02_01_181334_create_pterodactyl_settings.php @@ -11,8 +11,6 @@ class CreatePterodactylSettings extends LegacySettingsMigration $this->migrator->addEncrypted('pterodactyl.admin_token', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:TOKEN', '') : env('PTERODACTYL_TOKEN', '')); $this->migrator->addEncrypted('pterodactyl.user_token', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN', '') : ''); - // $this->migrator->add('pterodactyl.admin_token', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:TOKEN') : env('PTERODACTYL_TOKEN', '')); - // $this->migrator->add('pterodactyl.user_token', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN') : ''); $this->migrator->add('pterodactyl.panel_url', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:URL', '') : env('PTERODACTYL_URL', '')); $this->migrator->add('pterodactyl.per_page_limit', $table_exists ? $this->getOldValue('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT', 200) : 200); }