oauth response array

This commit is contained in:
xiaomlove
2024-04-05 22:40:06 +08:00
parent 8d07ad98f7
commit ff1b88a25f
15 changed files with 418 additions and 3 deletions

View File

@@ -54,6 +54,9 @@ class UserResource extends JsonResource
$out['completed_torrents_count'] = $this->completed_torrents_count;
$out['incomplete_torrents_count'] = $this->incomplete_torrents_count;
}
if ($request->routeIs("oauth.user_info")) {
$out['name'] = $this->username;
}
if (nexus()->isPlatformAdmin() && $request->routeIs('users.show')) {
$out['two_step_secret'] = $this->two_step_secret;