From 421d838e3549a16b2d1f2bb2ba89979c24e0c1e2 Mon Sep 17 00:00:00 2001 From: Oreo Oreoniv <28255085+zKoz210@users.noreply.github.com> Date: Tue, 29 Dec 2020 19:11:47 +0300 Subject: [PATCH] Fix retry after header --- app/Services/Backups/InitiateBackupService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Backups/InitiateBackupService.php b/app/Services/Backups/InitiateBackupService.php index f66722191..0aa7ae4ed 100644 --- a/app/Services/Backups/InitiateBackupService.php +++ b/app/Services/Backups/InitiateBackupService.php @@ -114,7 +114,7 @@ class InitiateBackupService $previous = $this->repository->getBackupsGeneratedDuringTimespan($server->id, $period); if ($previous->count() >= $limit) { throw new TooManyRequestsHttpException( - CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addMinutes(10)), + CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addSeconds($period)), sprintf('Only %d backups may be generated within a %d second span of time.', $limit, $period) ); }