mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-02 20:35:50 -05:00
Fix incorrect API definitions
This commit is contained in:
@@ -20,6 +20,7 @@ class ActivityLogController extends ClientApiController
|
||||
AllowedFilter::exact('ip'),
|
||||
AllowedFilter::partial('event'),
|
||||
])
|
||||
->allowedSorts(['timestamp'])
|
||||
->paginate(min($request->query('per_page', 50), 100))
|
||||
->appends($request->query());
|
||||
|
||||
|
||||
@@ -73,7 +73,12 @@ class ActivityLog extends Model
|
||||
|
||||
public function actor(): MorphTo
|
||||
{
|
||||
return $this->morphTo()->withTrashed();
|
||||
$morph = $this->morphTo();
|
||||
if (method_exists($morph, 'withTrashed')) {
|
||||
return $morph->withTrashed();
|
||||
}
|
||||
|
||||
return $morph;
|
||||
}
|
||||
|
||||
public function subjects()
|
||||
|
||||
@@ -35,6 +35,11 @@ class ActivityLogSubject extends Pivot
|
||||
|
||||
public function subject()
|
||||
{
|
||||
return $this->morphTo()->withTrashed();
|
||||
$morph = $this->morphTo();
|
||||
if (method_exists($morph, 'withTrashed')) {
|
||||
return $morph->withTrashed();
|
||||
}
|
||||
|
||||
return $morph;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user