mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-30 08:20:46 +00:00
Update IG Import Controller
This commit is contained in:
parent
4e8a7e7b07
commit
77819a6dd0
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,13 @@ trait Instagram
|
|||
|
||||
public function instagramStart(Request $request)
|
||||
{
|
||||
$completed = ImportJob::whereProfileId(Auth::user()->profile->id)
|
||||
->whereService('instagram')
|
||||
->whereNotNull('completed_at')
|
||||
->exists();
|
||||
if($completed == true) {
|
||||
return redirect(route('settings'))->with(['errors' => ['You can only import from Instagram once.']]);
|
||||
}
|
||||
$job = $this->instagramRedirectOrNew();
|
||||
return redirect($job->url());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue