rate limit on import

This commit is contained in:
hackerESQ
2024-09-19 21:26:29 -05:00
parent 5415c62d49
commit 9d808cd447
@@ -20,6 +20,12 @@ new class extends Component {
{
$this->validate();
if (!RateLimiter::attempt('import:'.auth()->user()->id, $perMinute = 3, fn()=>null)) {
$this->error(__('Hang on! You\'re doing that too much.'));
return;
}
try {
$import = (new BackupImport)->import($this->file);