fixes
This commit is contained in:
@@ -12,6 +12,10 @@ class GithubApp extends BaseModel
|
||||
'is_public' => 'boolean',
|
||||
'type' => 'string'
|
||||
];
|
||||
protected $hidden = [
|
||||
'client_secret',
|
||||
'webhook_secret',
|
||||
];
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::deleting(function (GithubApp $github_app) {
|
||||
|
||||
@@ -4,6 +4,10 @@ namespace App\Models;
|
||||
|
||||
class GitlabApp extends BaseModel
|
||||
{
|
||||
protected $hidden = [
|
||||
'webhook_token',
|
||||
'app_secret',
|
||||
];
|
||||
public function applications()
|
||||
{
|
||||
return $this->morphMany(Application::class, 'source');
|
||||
|
||||
@@ -11,6 +11,9 @@ class PrivateKey extends BaseModel
|
||||
'private_key',
|
||||
'team_id',
|
||||
];
|
||||
protected $hidden = [
|
||||
'private_key',
|
||||
];
|
||||
static public function ownedByCurrentTeam()
|
||||
{
|
||||
return PrivateKey::whereTeamId(session('currentTeam')->id);
|
||||
|
||||
@@ -74,9 +74,10 @@ class Server extends BaseModel
|
||||
{
|
||||
return $this->hasOne(ServerSetting::class);
|
||||
}
|
||||
static public function ownedByCurrentTeam()
|
||||
static public function ownedByCurrentTeam(array $select = ['*'])
|
||||
{
|
||||
return Server::whereTeamId(session('currentTeam')->id);
|
||||
$selectArray = collect($select)->concat(['id']);
|
||||
return Server::whereTeamId(session('currentTeam')->id)->with('settings')->select($selectArray->all());
|
||||
}
|
||||
|
||||
static public function validated()
|
||||
|
||||
Reference in New Issue
Block a user