mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update ImportPostController
This commit is contained in:
parent
6fd53a3001
commit
fe6123c820
3 changed files with 8 additions and 1 deletions
|
@ -78,7 +78,7 @@ class ImportPostController extends Controller
|
|||
|
||||
return ImportStatus::collection(
|
||||
ImportPost::whereProfileId($request->user()->profile_id)
|
||||
->whereNotNull('status_id')
|
||||
->has('status')
|
||||
->cursorPaginate(9)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Status;
|
||||
|
||||
class ImportPost extends Model
|
||||
{
|
||||
|
@ -14,4 +15,9 @@ class ImportPost extends Model
|
|||
'creation_date' => 'datetime',
|
||||
'metadata' => 'json'
|
||||
];
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->hasOne(Status::class, 'id', 'status_id');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace App\Observers;
|
|||
use App\Status;
|
||||
use App\Services\ProfileStatusService;
|
||||
use Cache;
|
||||
use App\Models\ImportPost;
|
||||
use App\Services\ImportService;
|
||||
|
||||
class StatusObserver
|
||||
|
|
Loading…
Reference in a new issue