Prevents the API From Lazy Loading

This commit is contained in:
Refringe 2024-10-12 13:19:54 -06:00
parent 08e4acaf04
commit f00c1a136b
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,8 @@ class ModResource extends JsonResource
*/
public function toArray(Request $request): array
{
$this->load(['users', 'versions', 'license']);
return [
'type' => 'mod',
'id' => $this->id,

View File

@ -15,6 +15,8 @@ class UserResource extends JsonResource
*/
public function toArray(Request $request): array
{
$this->load('role');
return [
'type' => 'user',
'id' => $this->id,