Skip to content

Commit aa2d0d7

Browse files
committed
add more dics
1 parent 95fd581 commit aa2d0d7

31 files changed

+205
-55
lines changed

.DS_Store

8 KB
Binary file not shown.

app/Http/Controllers/Users/TeamInvitesController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ public function store(CreateTeamInviteRequest $request, Team $team)
3737
}
3838

3939
if ($team->hasInvite($user)) {
40-
abort(400, $user->email . ' has already been invited to this team.');
40+
abort(
41+
400,
42+
$user->email . ' has already been invited to this team.'
43+
);
4144
}
4245

4346
$data = [

app/Http/Resources/UserResource.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public function toArray($request)
3737
// 'api_token' => $this->api_token,
3838
'photo_url' => $this->photo_url,
3939
'teams' => TeamResource::collection($this->teams),
40-
'team_memberships' => $this->memberships()->with(['team:id,name'])->get(),
40+
'team_memberships' => $this->memberships()
41+
->with(['team:id,name'])
42+
->get(),
4143
'team_invites' => $this->invites()->with(['team.user']),
4244
'auth_provider' => $this->auth_provider,
4345
'server_count' => $serverCount,

app/Team.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ public function hasMember(User $user)
2525
return true;
2626
}
2727

28-
return (bool) $this->invites()->where('status', 'accepted')
28+
return (bool) $this->invites()
29+
->where('status', 'accepted')
2930
->where('user_id', $user->id)
3031
->first();
3132
}
3233

33-
public function hasInvite(User $user) {
34+
public function hasInvite(User $user)
35+
{
3436
if ((int) $this->user_id === (int) $user->id) {
3537
return false;
3638
}
3739

38-
return (bool) $this->invites()->where('user_id', $user->id)
40+
return (bool) $this->invites()
41+
->where('user_id', $user->id)
3942
->first();
4043
}
4144
}

public/.DS_Store

0 Bytes
Binary file not shown.

public/assets/.DS_Store

2 KB
Binary file not shown.

public/assets/images/.DS_Store

2 KB
Binary file not shown.
229 KB
Loading
222 KB
Loading
301 KB
Loading

0 commit comments

Comments
 (0)