1
0
Fork 0

Merge pull request #2040 from pixelfed/staging

Update ProfileController, revert pgsql change
This commit is contained in:
daniel 2020-02-20 22:53:35 -07:00 committed by GitHub
commit 13bb89f2f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -22,14 +22,11 @@ class ProfileController extends Controller
{
public function show(Request $request, $username)
{
if(config('database.default') == 'pgsql') {
$username = strtolower($username);
}
$user = Profile::whereNull('domain')
->whereNull('status')
->whereUsername($username)
->firstOrFail();
if($request->wantsJson() && config('federation.activitypub.enabled')) {
return $this->showActivityPub($request, $user);
}
@ -247,6 +244,6 @@ class ProfileController extends Controller
->where('expires_at', '>', now())
->count();
abort_unless($exists > 0, 404);
return view('profile.story', compact('pid'));
return view('profile.story', compact('pid', 'profile'));
}
}