[admin] change uploaded + downloaded + bonus + invites

This commit is contained in:
xiaomlove
2022-05-10 20:12:11 +08:00
parent eccc182e33
commit 3b9125d236
43 changed files with 251 additions and 82 deletions

View File

@@ -152,7 +152,7 @@ class User extends Authenticatable
public static $commonFields = [
'id', 'username', 'email', 'class', 'status', 'added', 'avatar',
'uploaded', 'downloaded', 'seedbonus', 'seedtime', 'leechtime',
'invited_by', 'enabled', 'seed_points', 'last_access'
'invited_by', 'enabled', 'seed_points', 'last_access', 'invites'
];
public static function getDefaultUserAttributes(): array
@@ -378,7 +378,7 @@ class User extends Authenticatable
}
public function updateWithModComment(array $update, $modComment)
public function updateWithModComment(array $update, $modComment): bool
{
if (!$this->exists) {
throw new \RuntimeException('This method only works when user exists!');