mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-02 03:03:17 +00:00
Update Import controller
This commit is contained in:
parent
a27418d4ef
commit
4e8a7e7b07
1 changed files with 16 additions and 2 deletions
|
@ -11,6 +11,7 @@ use App\{
|
||||||
Profile,
|
Profile,
|
||||||
User
|
User
|
||||||
};
|
};
|
||||||
|
use App\Jobs\ImportPipeline\ImportInstagram;
|
||||||
|
|
||||||
trait Instagram
|
trait Instagram
|
||||||
{
|
{
|
||||||
|
@ -134,8 +135,6 @@ trait Instagram
|
||||||
$job->stage = 3;
|
$job->stage = 3;
|
||||||
$job->save();
|
$job->save();
|
||||||
return redirect($job->url());
|
return redirect($job->url());
|
||||||
return $json;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function instagramStepThree(Request $request, $uuid)
|
public function instagramStepThree(Request $request, $uuid)
|
||||||
|
@ -148,4 +147,19 @@ trait Instagram
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
return view('settings.import.instagram.step-three', compact('profile', 'job'));
|
return view('settings.import.instagram.step-three', compact('profile', 'job'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function instagramStepThreeStore(Request $request, $uuid)
|
||||||
|
{
|
||||||
|
$profile = Auth::user()->profile;
|
||||||
|
|
||||||
|
$job = ImportJob::whereProfileId($profile->id)
|
||||||
|
->whereNull('completed_at')
|
||||||
|
->whereUuid($uuid)
|
||||||
|
->whereStage(3)
|
||||||
|
->firstOrFail();
|
||||||
|
|
||||||
|
ImportInstagram::dispatchNow($job);
|
||||||
|
|
||||||
|
return redirect($profile->url());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue