Explorar o código

Update RelationshipSettings Controller, fixes #1605

Daniel Supernault %!s(int64=5) %!d(string=hai) anos
pai
achega
4d2da2f1b0
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      app/Http/Controllers/Settings/RelationshipSettings.php

+ 1 - 5
app/Http/Controllers/Settings/RelationshipSettings.php

@@ -22,7 +22,7 @@ trait RelationshipSettings
 			'mode' => 'nullable|string|in:following,followers,hashtags'
 		]);
 
-		$mode = $request->input('mode');
+		$mode = $request->input('mode') ?? 'followers';
 		$profile = Auth::user()->profile;
 
 		switch ($mode) {
@@ -37,10 +37,6 @@ trait RelationshipSettings
 			case 'hashtags':
 				$data = $profile->hashtagFollowing()->with('hashtag')->simplePaginate(10);
 				break;
-			
-			default:
-				$data = [];
-				break;
 		}
 
 		return view('settings.relationships.home', compact('profile', 'mode', 'data'));