Skip to content

Commit

Permalink
temp invite
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Feb 26, 2024
1 parent 9c07206 commit 79fe569
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Jobs/GenerateTemporaryInvite.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public function handle()
return;
}
$idArr = explode(",", $idStr);
$now = Carbon::now();
$expiredAt = Carbon::now()->addDays($this->days);
foreach ($idArr as $uid) {
try {
$hashArr = $toolRep->generateUniqueInviteHash([], $this->count, $this->count);
Expand All @@ -74,8 +76,8 @@ public function handle()
'invitee' => '',
'hash' => $hash,
'valid' => 0,
'expired_at' => Carbon::now()->addDays($this->days),
'created_at' => Carbon::now(),
'expired_at' => $expiredAt,
'created_at' => $now,
];
}
if (!empty($data)) {
Expand Down

0 comments on commit 79fe569

Please sign in to comment.