API Feature (#334)

This commit is contained in:
Saeed Vaziry
2024-11-01 16:49:57 +01:00
committed by GitHub
parent da7b24640e
commit 417bf73e44
143 changed files with 36520 additions and 586 deletions

View File

@ -9,7 +9,7 @@
class CreateCronJob
{
public function create(Server $server, array $input): void
public function create(Server $server, array $input): CronJob
{
$cronJob = new CronJob([
'server_id' => $server->id,
@ -23,6 +23,8 @@ public function create(Server $server, array $input): void
$server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user));
$cronJob->status = CronjobStatus::READY;
$cronJob->save();
return $cronJob;
}
public static function rules(array $input): array