switch to auth()->user from session

This commit is contained in:
Andras Bacsai
2023-08-11 17:31:53 +02:00
parent e60ec6c47e
commit 833e45155d
32 changed files with 90 additions and 77 deletions

View File

@@ -19,12 +19,12 @@ class GithubApp extends BaseModel
static public function public()
{
return GithubApp::whereTeamId(session('currentTeam')->id)->whereisPublic(true)->whereNotNull('app_id')->get();
return GithubApp::whereTeamId(auth()->user()->currentTeam()->id)->whereisPublic(true)->whereNotNull('app_id')->get();
}
static public function private()
{
return GithubApp::whereTeamId(session('currentTeam')->id)->whereisPublic(false)->whereNotNull('app_id')->get();
return GithubApp::whereTeamId(auth()->user()->currentTeam()->id)->whereisPublic(false)->whereNotNull('app_id')->get();
}
protected static function booted(): void