fix: limits & server creation page

This commit is contained in:
Andras Bacsai
2023-08-21 10:18:11 +02:00
parent 7e37068fc0
commit b7ec1d7d65
5 changed files with 20 additions and 7 deletions

View File

@@ -33,8 +33,9 @@ class Server extends BaseModel
static public function ownedByCurrentTeam(array $select = ['*'])
{
$teamId = auth()->user()->currentTeam()->id;
$selectArray = collect($select)->concat(['id']);
return Server::whereTeamId(auth()->user()->currentTeam()->id)->with('settings')->select($selectArray->all())->orderBy('name');
return Server::whereTeamId($teamId)->with('settings')->select($selectArray->all())->orderBy('name');
}
static public function isUsable()