refactor: Remove unused server timezone seeder and related code

This commit is contained in:
Andras Bacsai
2024-08-26 15:26:08 +02:00
parent b8ff0540e2
commit 68169f75d1
12 changed files with 337 additions and 409 deletions

View File

@@ -37,6 +37,30 @@ class InstanceSettings extends Model implements SendsEmail
);
}
public function updateCheckFrequency(): Attribute
{
return Attribute::make(
set: function ($value) {
return translate_cron_expression($value);
},
get: function ($value) {
return translate_cron_expression($value);
}
);
}
public function autoUpdateFrequency(): Attribute
{
return Attribute::make(
set: function ($value) {
return translate_cron_expression($value);
},
get: function ($value) {
return translate_cron_expression($value);
}
);
}
public static function get()
{
return InstanceSettings::findOrFail(0);

View File

@@ -2,6 +2,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use OpenApi\Attributes as OA;
@@ -58,4 +59,18 @@ class ServerSetting extends Model
{
return $this->belongsTo(Server::class);
}
}
public function dockerCleanupFrequency(): Attribute
{
return Attribute::make(
set: function ($value) {
ray($value);
return translate_cron_expression($value);
},
get: function ($value) {
return translate_cron_expression($value);
}
);
}
}