mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update InternalApiController, redirect remote post and profiles to Metro 2.0
This commit is contained in:
parent
16e725183e
commit
3c35158ebc
1 changed files with 2 additions and 16 deletions
|
@ -410,26 +410,12 @@ class InternalApiController extends Controller
|
||||||
|
|
||||||
public function remoteProfile(Request $request, $id)
|
public function remoteProfile(Request $request, $id)
|
||||||
{
|
{
|
||||||
$profile = Profile::whereNull('status')
|
return redirect('/i/web/profile/' . $id);
|
||||||
->whereNotNull('domain')
|
|
||||||
->findOrFail($id);
|
|
||||||
$user = Auth::user();
|
|
||||||
|
|
||||||
return view('profile.remote', compact('profile', 'user'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remoteStatus(Request $request, $profileId, $statusId)
|
public function remoteStatus(Request $request, $profileId, $statusId)
|
||||||
{
|
{
|
||||||
$user = Profile::whereNull('status')
|
return redirect('/i/web/post/' . $statusId);
|
||||||
->whereNotNull('domain')
|
|
||||||
->findOrFail($profileId);
|
|
||||||
|
|
||||||
$status = Status::whereProfileId($user->id)
|
|
||||||
->whereNull('reblog_of_id')
|
|
||||||
->whereIn('visibility', ['public', 'unlisted'])
|
|
||||||
->findOrFail($statusId);
|
|
||||||
$template = $status->in_reply_to_id ? 'status.reply' : 'status.remote';
|
|
||||||
return view($template, compact('user', 'status'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function requestEmailVerification(Request $request)
|
public function requestEmailVerification(Request $request)
|
||||||
|
|
Loading…
Reference in a new issue