mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 02:14:36 +00:00
fix(api): improve scheduled tasks validation and delete logic
- Use explicit has() checks for timeout and enabled fields to properly handle falsy values - Add validation to prevent empty update requests - Optimize delete endpoint to use direct query deletion instead of fetch-then-delete - Update factory to use Team::factory() for proper test isolation
This commit is contained in:
1 parent
f0e93eadde
commit
4d36265017
2 files changed
+10
-7
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Team;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ScheduledTaskFactory extends Factory
|
||||
@@ -14,7 +15,7 @@ class ScheduledTaskFactory extends Factory
|
||||
'frequency' => '* * * * *',
|
||||
'timeout' => 300,
|
||||
'enabled' => true,
|
||||
'team_id' => 1,
|
||||
'team_id' => Team::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user