kopia lustrzana https://github.com/pixelfed/pixelfed
Update SpaController, redirect web ui hashtags to legacy page for unauthenticated users
rodzic
7dc65456c7
commit
a44b812b13
|
@ -126,4 +126,13 @@ class SpaController extends Controller
|
|||
}
|
||||
return redirect('/i/web/profile/' . $id);
|
||||
}
|
||||
|
||||
public function hashtagRedirect(Request $request, $tag)
|
||||
{
|
||||
if(!$request->user()) {
|
||||
return redirect('/discover/tags/' . $tag);
|
||||
}
|
||||
|
||||
return view('layouts.spa');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,6 +351,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::post('warning', 'AccountInterstitialController@read');
|
||||
Route::get('my2020', 'SeasonalController@yearInReview');
|
||||
|
||||
Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
|
||||
Route::get('web/username/{id}', 'SpaController@usernameRedirect');
|
||||
Route::get('web/post/{id}', 'SpaController@webPost');
|
||||
Route::get('web/profile/{id}', 'SpaController@webProfile');
|
||||
|
|
Ładowanie…
Reference in New Issue