mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 18:15:24 +00:00
fix: better invitation errors
This commit is contained in:
1 parent
4ce8d04a13
commit
a297c9fcab
5 files changed
+36
-9
No files matched your search
@@ -28,8 +28,8 @@ class TeamInvitation extends Model
|
||||
public function isValid()
|
||||
{
|
||||
$createdAt = $this->created_at;
|
||||
$diff = $createdAt->diffInMinutes(now());
|
||||
if ($diff <= config('constants.invitation.link.expiration')) {
|
||||
$diff = $createdAt->diffInDays(now());
|
||||
if ($diff <= config('constants.invitation.link.expiration_days')) {
|
||||
return true;
|
||||
} else {
|
||||
$this->delete();
|
||||
|
||||
Reference in new issue
Block a user