announce buy torrent add cache and lock

This commit is contained in:
xiaomlove
2023-06-01 01:41:14 +08:00
parent 29cbe19c21
commit ff325ad687
5 changed files with 77 additions and 11 deletions

View File

@@ -188,7 +188,7 @@ class User extends Authenticatable implements FilamentUser, HasName
* @var array
*/
protected $hidden = [
'secret', 'passhash',
'secret', 'passhash', 'passkey'
];
/**
@@ -219,7 +219,7 @@ class User extends Authenticatable implements FilamentUser, HasName
];
public static $commonFields = [
'id', 'username', 'email', 'class', 'status', 'added', 'avatar',
'id', 'username', 'email', 'class', 'status', 'added', 'avatar', 'passkey',
'uploaded', 'downloaded', 'seedbonus', 'seedtime', 'leechtime',
'invited_by', 'enabled', 'seed_points', 'last_access', 'invites',
'lang', 'attendance_card', 'privacy', 'noad', 'downloadpos', 'donoruntil', 'donor',

View File

@@ -349,6 +349,7 @@ class BonusRepository extends BaseRepository
];
BonusLogs::query()->insert($bonusLog);
do_log("bonusLog: " . nexus_json_encode($bonusLog));
clear_user_cache($user->id, $user->passkey);
});
}