web.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. <?php
  2. Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
  3. Route::get('/', 'SiteController@home')->name('timeline.personal');
  4. Route::redirect('/home', '/')->name('home');
  5. Route::get('web/directory', 'LandingController@directoryRedirect');
  6. Route::get('web/explore', 'LandingController@exploreRedirect');
  7. Route::get('authorize_interaction', 'AuthorizeInteractionController@get');
  8. Auth::routes();
  9. Route::get('auth/raw/mastodon/start', 'RemoteAuthController@startRedirect');
  10. Route::post('auth/raw/mastodon/config', 'RemoteAuthController@getConfig');
  11. Route::post('auth/raw/mastodon/domains', 'RemoteAuthController@getAuthDomains');
  12. Route::post('auth/raw/mastodon/start', 'RemoteAuthController@start');
  13. Route::post('auth/raw/mastodon/redirect', 'RemoteAuthController@redirect');
  14. Route::get('auth/raw/mastodon/preflight', 'RemoteAuthController@preflight');
  15. Route::get('auth/mastodon/callback', 'RemoteAuthController@handleCallback');
  16. Route::get('auth/mastodon/getting-started', 'RemoteAuthController@onboarding');
  17. Route::post('auth/raw/mastodon/s/check', 'RemoteAuthController@sessionCheck');
  18. Route::post('auth/raw/mastodon/s/prefill', 'RemoteAuthController@sessionGetMastodonData');
  19. Route::post('auth/raw/mastodon/s/username-check', 'RemoteAuthController@sessionValidateUsername');
  20. Route::post('auth/raw/mastodon/s/email-check', 'RemoteAuthController@sessionValidateEmail');
  21. Route::post('auth/raw/mastodon/s/following', 'RemoteAuthController@sessionGetMastodonFollowers');
  22. Route::post('auth/raw/mastodon/s/submit', 'RemoteAuthController@handleSubmit');
  23. Route::post('auth/raw/mastodon/s/store-bio', 'RemoteAuthController@storeBio');
  24. Route::post('auth/raw/mastodon/s/store-avatar', 'RemoteAuthController@storeAvatar');
  25. Route::post('auth/raw/mastodon/s/account-to-id', 'RemoteAuthController@accountToId');
  26. Route::post('auth/raw/mastodon/s/finish-up', 'RemoteAuthController@finishUp');
  27. Route::post('auth/raw/mastodon/s/login', 'RemoteAuthController@handleLogin');
  28. Route::get('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegister');
  29. Route::post('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegisterStore');
  30. Route::get('auth/sign_up', 'SiteController@curatedOnboarding')->name('auth.curated-onboarding');
  31. Route::post('auth/sign_up', 'CuratedRegisterController@proceed');
  32. Route::get('auth/sign_up/concierge/response-sent', 'CuratedRegisterController@conciergeResponseSent');
  33. Route::get('auth/sign_up/concierge', 'CuratedRegisterController@concierge');
  34. Route::post('auth/sign_up/concierge', 'CuratedRegisterController@conciergeStore');
  35. Route::get('auth/sign_up/concierge/form', 'CuratedRegisterController@conciergeFormShow');
  36. Route::post('auth/sign_up/concierge/form', 'CuratedRegisterController@conciergeFormStore');
  37. Route::get('auth/sign_up/confirm', 'CuratedRegisterController@confirmEmail');
  38. Route::post('auth/sign_up/confirm', 'CuratedRegisterController@confirmEmailHandle');
  39. Route::get('auth/sign_up/confirmed', 'CuratedRegisterController@emailConfirmed');
  40. Route::get('auth/sign_up/resend-confirmation', 'CuratedRegisterController@resendConfirmation');
  41. Route::post('auth/sign_up/resend-confirmation', 'CuratedRegisterController@resendConfirmationProcess');
  42. Route::get('auth/forgot/email', 'UserEmailForgotController@index')->name('email.forgot');
  43. Route::post('auth/forgot/email', 'UserEmailForgotController@store')->middleware('throttle:10,900,forgotEmail');
  44. Route::group([
  45. 'as' => 'passport.',
  46. 'prefix' => config('passport.path', 'oauth'),
  47. ], function () {
  48. Route::post('/token', [
  49. 'uses' => '\Laravel\Passport\Http\Controllers\AccessTokenController@issueToken',
  50. 'as' => 'token',
  51. 'middleware' => 'throttle',
  52. ]);
  53. Route::get('/authorize', [
  54. 'uses' => '\Laravel\Passport\Http\Controllers\AuthorizationController@authorize',
  55. 'as' => 'authorizations.authorize',
  56. 'middleware' => 'web',
  57. ]);
  58. $guard = config('passport.guard', null);
  59. Route::middleware(['web', $guard ? 'auth:'.$guard : 'auth'])->group(function () {
  60. Route::post('/token/refresh', [
  61. 'uses' => '\Laravel\Passport\Http\Controllers\TransientTokenController@refresh',
  62. 'as' => 'token.refresh',
  63. ]);
  64. Route::post('/authorize', [
  65. 'uses' => '\App\Http\Controllers\OAuth\OobAuthorizationController@approve',
  66. 'as' => 'authorizations.approve',
  67. ]);
  68. Route::delete('/authorize', [
  69. 'uses' => '\Laravel\Passport\Http\Controllers\DenyAuthorizationController@deny',
  70. 'as' => 'authorizations.deny',
  71. ]);
  72. Route::get('/tokens', [
  73. 'uses' => '\Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController@forUser',
  74. 'as' => 'tokens.index',
  75. ]);
  76. Route::delete('/tokens/{token_id}', [
  77. 'uses' => '\Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController@destroy',
  78. 'as' => 'tokens.destroy',
  79. ]);
  80. Route::get('/clients', [
  81. 'uses' => '\Laravel\Passport\Http\Controllers\ClientController@forUser',
  82. 'as' => 'clients.index',
  83. ]);
  84. Route::post('/clients', [
  85. 'uses' => '\Laravel\Passport\Http\Controllers\ClientController@store',
  86. 'as' => 'clients.store',
  87. ]);
  88. Route::put('/clients/{client_id}', [
  89. 'uses' => '\Laravel\Passport\Http\Controllers\ClientController@update',
  90. 'as' => 'clients.update',
  91. ]);
  92. Route::delete('/clients/{client_id}', [
  93. 'uses' => '\Laravel\Passport\Http\Controllers\ClientController@destroy',
  94. 'as' => 'clients.destroy',
  95. ]);
  96. Route::get('/scopes', [
  97. 'uses' => '\Laravel\Passport\Http\Controllers\ScopeController@all',
  98. 'as' => 'scopes.index',
  99. ]);
  100. Route::get('/personal-access-tokens', [
  101. 'uses' => '\Laravel\Passport\Http\Controllers\PersonalAccessTokenController@forUser',
  102. 'as' => 'personal.tokens.index',
  103. ]);
  104. Route::post('/personal-access-tokens', [
  105. 'uses' => '\Laravel\Passport\Http\Controllers\PersonalAccessTokenController@store',
  106. 'as' => 'personal.tokens.store',
  107. ]);
  108. Route::delete('/personal-access-tokens/{token_id}', [
  109. 'uses' => '\Laravel\Passport\Http\Controllers\PersonalAccessTokenController@destroy',
  110. 'as' => 'personal.tokens.destroy',
  111. ]);
  112. });
  113. });
  114. Route::get('discover', 'DiscoverController@home')->name('discover');
  115. Route::get('discover/tags/{hashtag}', 'DiscoverController@showTags');
  116. Route::get('discover/places', 'PlaceController@directoryHome')->name('discover.places');
  117. Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
  118. Route::get('discover/location/country/{country}', 'PlaceController@directoryCities');
  119. Route::get('/i/app-email-verify', 'AppRegisterController@index');
  120. Route::post('/i/app-email-verify', 'AppRegisterController@store')->middleware('throttle:app-signup');
  121. Route::get('/i/app-email-resend', 'AppRegisterController@resendVerification');
  122. Route::post('/i/app-email-resend', 'AppRegisterController@resendVerificationStore')->middleware('throttle:app-code-resend');
  123. Route::group(['prefix' => 'i'], function () {
  124. Route::redirect('/', '/');
  125. Route::get('compose', 'StatusController@compose')->name('compose');
  126. Route::post('comment', 'CommentController@store');
  127. Route::post('delete', 'StatusController@delete');
  128. Route::post('mute', 'AccountController@mute');
  129. Route::post('unmute', 'AccountController@unmute');
  130. Route::post('block', 'AccountController@block');
  131. Route::post('unblock', 'AccountController@unblock');
  132. Route::post('like', 'LikeController@store');
  133. Route::post('share', 'StatusController@storeShare');
  134. Route::post('follow', 'FollowerController@store');
  135. Route::post('bookmark', 'BookmarkController@store');
  136. Route::get('lang/{locale}', 'SiteController@changeLocale');
  137. Route::get('restored', 'AccountController@accountRestored');
  138. Route::get('verify-email', 'AccountController@verifyEmail')->name('account.verify_email');
  139. Route::post('verify-email', 'AccountController@sendVerifyEmail');
  140. Route::get('verify-email/request', 'InternalApiController@requestEmailVerification');
  141. Route::post('verify-email/request', 'InternalApiController@requestEmailVerificationStore');
  142. Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail');
  143. Route::get('auth/sudo', 'AccountController@sudoMode');
  144. Route::post('auth/sudo', 'AccountController@sudoModeVerify');
  145. Route::get('auth/checkpoint', 'AccountController@twoFactorCheckpoint');
  146. Route::post('auth/checkpoint', 'AccountController@twoFactorVerify');
  147. Route::get('results', 'SearchController@results');
  148. Route::post('visibility', 'StatusController@toggleVisibility');
  149. Route::post('metro/dark-mode', 'SettingsController@metroDarkMode');
  150. Route::group(['prefix' => 'report'], function () {
  151. Route::get('/', 'ReportController@showForm')->name('report.form');
  152. Route::post('/', 'ReportController@formStore');
  153. Route::get('not-interested', 'ReportController@notInterestedForm')->name('report.not-interested');
  154. Route::get('spam', 'ReportController@spamForm')->name('report.spam');
  155. Route::get('spam/comment', 'ReportController@spamCommentForm')->name('report.spam.comment');
  156. Route::get('spam/post', 'ReportController@spamPostForm')->name('report.spam.post');
  157. Route::get('spam/profile', 'ReportController@spamProfileForm')->name('report.spam.profile');
  158. Route::get('sensitive/comment', 'ReportController@sensitiveCommentForm')->name('report.sensitive.comment');
  159. Route::get('sensitive/post', 'ReportController@sensitivePostForm')->name('report.sensitive.post');
  160. Route::get('sensitive/profile', 'ReportController@sensitiveProfileForm')->name('report.sensitive.profile');
  161. Route::get('abusive/comment', 'ReportController@abusiveCommentForm')->name('report.abusive.comment');
  162. Route::get('abusive/post', 'ReportController@abusivePostForm')->name('report.abusive.post');
  163. Route::get('abusive/profile', 'ReportController@abusiveProfileForm')->name('report.abusive.profile');
  164. });
  165. Route::get('collections/create', 'CollectionController@create');
  166. Route::get('me', 'ProfileController@meRedirect');
  167. Route::get('intent/follow', 'SiteController@followIntent');
  168. Route::get('rs/{id}', 'StoryController@remoteStory');
  169. Route::get('stories/new', 'StoryController@compose');
  170. Route::get('my/story', 'StoryController@iRedirect');
  171. Route::get('web/profile/_/{id}', 'InternalApiController@remoteProfile');
  172. Route::get('web/post/_/{profileId}/{statusid}', 'InternalApiController@remoteStatus');
  173. Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() {
  174. Route::get('job/{uuid}/1', 'ImportController@instagramStepOne');
  175. Route::post('job/{uuid}/1', 'ImportController@instagramStepOneStore');
  176. Route::get('job/{uuid}/2', 'ImportController@instagramStepTwo');
  177. Route::post('job/{uuid}/2', 'ImportController@instagramStepTwoStore');
  178. Route::get('job/{uuid}/3', 'ImportController@instagramStepThree');
  179. Route::post('job/{uuid}/3', 'ImportController@instagramStepThreeStore');
  180. });
  181. Route::get('redirect', 'SiteController@redirectUrl');
  182. Route::post('admin/media/block/add', 'MediaBlocklistController@add');
  183. Route::post('admin/media/block/delete', 'MediaBlocklistController@delete');
  184. Route::get('warning', 'AccountInterstitialController@get');
  185. Route::post('warning', 'AccountInterstitialController@read');
  186. Route::get('contact-admin-response/{id}', 'ContactController@showAdminResponse');
  187. Route::get('web/my-portfolio', 'PortfolioController@myRedirect');
  188. Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
  189. Route::get('web/username/{id}', 'SpaController@usernameRedirect');
  190. Route::get('web/post/{id}', 'SpaController@webPost');
  191. Route::get('web/profile/{id}', 'SpaController@webProfile');
  192. Route::get('web/{q}', 'SpaController@index')->where('q', '.*');
  193. Route::get('web', 'SpaController@index');
  194. });
  195. Route::group(['prefix' => 'account'], function () {
  196. Route::redirect('/', '/');
  197. Route::get('direct', 'AccountController@direct');
  198. Route::get('direct/t/{id}', 'AccountController@directMessage');
  199. Route::get('activity', 'AccountController@notifications')->name('notifications');
  200. Route::get('follow-requests', 'AccountController@followRequests')->name('follow-requests');
  201. Route::post('follow-requests', 'AccountController@followRequestHandle');
  202. Route::get('follow-requests.json', 'AccountController@followRequestsJson');
  203. Route::get('portfolio/{username}.json', 'PortfolioController@getApFeed');
  204. Route::get('portfolio/{username}.rss', 'PortfolioController@getRssFeed');
  205. });
  206. Route::group(['prefix' => 'settings'], function () {
  207. Route::redirect('/', '/settings/home');
  208. Route::get('home', 'SettingsController@home')
  209. ->name('settings');
  210. Route::post('home', 'SettingsController@homeUpdate');
  211. Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar');
  212. Route::post('avatar', 'AvatarController@store');
  213. Route::delete('avatar', 'AvatarController@deleteAvatar');
  214. Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone');
  215. Route::post('password', 'SettingsController@passwordUpdate')->middleware('dangerzone');
  216. Route::get('email', 'SettingsController@email')->name('settings.email')->middleware('dangerzone');
  217. Route::post('email', 'SettingsController@emailUpdate')->middleware('dangerzone');
  218. Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications');
  219. Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy');
  220. Route::post('privacy', 'SettingsController@privacyStore');
  221. Route::get('privacy/muted-users', 'SettingsController@mutedUsers')->name('settings.privacy.muted-users');
  222. Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate');
  223. Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users');
  224. Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate');
  225. Route::get('privacy/domain-blocks', 'SettingsController@domainBlocks')->name('settings.privacy.domain-blocks');
  226. Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances');
  227. Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore');
  228. Route::post('privacy/blocked-instances/unblock', 'SettingsController@blockedInstanceUnblock')->name('settings.privacy.blocked-instances.unblock');
  229. Route::get('privacy/blocked-keywords', 'SettingsController@blockedKeywords')->name('settings.privacy.blocked-keywords');
  230. Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account');
  231. Route::group(['prefix' => 'remove', 'middleware' => 'dangerzone'], function() {
  232. Route::get('request/temporary', 'SettingsController@removeAccountTemporary')->name('settings.remove.temporary');
  233. Route::post('request/temporary', 'SettingsController@removeAccountTemporarySubmit');
  234. Route::get('request/permanent', 'SettingsController@removeAccountPermanent')->name('settings.remove.permanent');
  235. Route::post('request/permanent', 'SettingsController@removeAccountPermanentSubmit');
  236. });
  237. Route::group(['prefix' => 'security', 'middleware' => 'dangerzone'], function() {
  238. Route::get(
  239. '/',
  240. 'SettingsController@security'
  241. )->name('settings.security');
  242. Route::get(
  243. '2fa/setup',
  244. 'SettingsController@securityTwoFactorSetup'
  245. )->name('settings.security.2fa.setup');
  246. Route::post(
  247. '2fa/setup',
  248. 'SettingsController@securityTwoFactorSetupStore'
  249. );
  250. Route::get(
  251. '2fa/edit',
  252. 'SettingsController@securityTwoFactorEdit'
  253. )->name('settings.security.2fa.edit');
  254. Route::post(
  255. '2fa/edit',
  256. 'SettingsController@securityTwoFactorUpdate'
  257. );
  258. Route::get(
  259. '2fa/recovery-codes',
  260. 'SettingsController@securityTwoFactorRecoveryCodes'
  261. )->name('settings.security.2fa.recovery');
  262. Route::post(
  263. '2fa/recovery-codes',
  264. 'SettingsController@securityTwoFactorRecoveryCodesRegenerate'
  265. );
  266. });
  267. Route::get('parental-controls', 'ParentalControlsController@index')->name('settings.parental-controls')->middleware('dangerzone');
  268. Route::get('parental-controls/add', 'ParentalControlsController@add')->name('settings.pc.add')->middleware('dangerzone');
  269. Route::post('parental-controls/add', 'ParentalControlsController@store')->middleware('dangerzone');
  270. Route::get('parental-controls/manage/{id}', 'ParentalControlsController@view')->middleware('dangerzone');
  271. Route::post('parental-controls/manage/{id}', 'ParentalControlsController@update')->middleware('dangerzone');
  272. Route::get('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInvite')->name('settings.pc.cancel-invite')->middleware('dangerzone');
  273. Route::post('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInviteHandle')->middleware('dangerzone');
  274. Route::get('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManaging')->name('settings.pc.stop-managing')->middleware('dangerzone');
  275. Route::post('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManagingHandle')->middleware('dangerzone');
  276. Route::get('applications', 'SettingsController@applications')->name('settings.applications')->middleware('dangerzone');
  277. Route::get('data-export', 'SettingsController@dataExport')->name('settings.dataexport')->middleware('dangerzone');
  278. Route::post('data-export/following', 'SettingsController@exportFollowing')->middleware('dangerzone');
  279. Route::post('data-export/followers', 'SettingsController@exportFollowers')->middleware('dangerzone');
  280. Route::post('data-export/mute-block-list', 'SettingsController@exportMuteBlockList')->middleware('dangerzone');
  281. Route::post('data-export/account', 'SettingsController@exportAccount')->middleware('dangerzone');
  282. Route::post('data-export/statuses', 'SettingsController@exportStatuses')->middleware('dangerzone');
  283. Route::get('developers', 'SettingsController@developers')->name('settings.developers')->middleware('dangerzone');
  284. Route::get('labs', 'SettingsController@labs')->name('settings.labs');
  285. Route::post('labs', 'SettingsController@labsStore');
  286. Route::get('accessibility', 'SettingsController@accessibility')->name('settings.accessibility');
  287. Route::post('accessibility', 'SettingsController@accessibilityStore');
  288. Route::group(['prefix' => 'relationships'], function() {
  289. Route::redirect('/', '/settings/relationships/home');
  290. Route::get('home', 'SettingsController@relationshipsHome')->name('settings.relationships');
  291. });
  292. Route::get('invites/create', 'UserInviteController@create')->name('settings.invites.create');
  293. Route::post('invites/create', 'UserInviteController@store');
  294. Route::get('invites', 'UserInviteController@show')->name('settings.invites');
  295. // Route::get('sponsor', 'SettingsController@sponsor')->name('settings.sponsor');
  296. // Route::post('sponsor', 'SettingsController@sponsorStore');
  297. Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() {
  298. Route::get('/', 'SettingsController@dataImport')->name('settings.import');
  299. Route::prefix('instagram')->group(function() {
  300. Route::get('/', 'ImportController@instagram')->name('settings.import.ig');
  301. Route::post('/', 'ImportController@instagramStart');
  302. });
  303. Route::prefix('mastodon')->group(function() {
  304. Route::get('/', 'ImportController@mastodon')->name('settings.import.mastodon');
  305. });
  306. });
  307. Route::get('timeline', 'SettingsController@timelineSettings')->name('settings.timeline');
  308. Route::post('timeline', 'SettingsController@updateTimelineSettings');
  309. Route::get('media', 'SettingsController@mediaSettings')->name('settings.media');
  310. Route::post('media', 'SettingsController@updateMediaSettings');
  311. Route::group(['prefix' => 'account/aliases', 'middleware' => 'dangerzone'], function() {
  312. Route::get('manage', 'ProfileAliasController@index');
  313. Route::post('manage', 'ProfileAliasController@store');
  314. Route::post('manage/delete', 'ProfileAliasController@delete');
  315. });
  316. Route::group(['prefix' => 'account/migration', 'middleware' => 'dangerzone'], function() {
  317. Route::get('manage', 'ProfileMigrationController@index');
  318. Route::post('manage', 'ProfileMigrationController@store');
  319. });
  320. });
  321. Route::group(['prefix' => 'site'], function () {
  322. Route::redirect('/', '/');
  323. Route::get('about', 'SiteController@about')->name('site.about');
  324. Route::view('help', 'site.help')->name('site.help');
  325. Route::view('developer-api', 'site.developer')->name('site.developers');
  326. Route::view('fediverse', 'site.fediverse')->name('site.fediverse');
  327. Route::view('open-source', 'site.opensource')->name('site.opensource');
  328. Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
  329. Route::get('terms', 'SiteController@terms')->name('site.terms');
  330. Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
  331. Route::view('platform', 'site.platform')->name('site.platform');
  332. Route::view('language', 'site.language')->name('site.language');
  333. Route::get('contact', 'ContactController@show')->name('site.contact');
  334. Route::post('contact', 'ContactController@store');
  335. Route::group(['prefix'=>'kb'], function() {
  336. Route::view('getting-started', 'site.help.getting-started')->name('help.getting-started');
  337. Route::view('sharing-media', 'site.help.sharing-media')->name('help.sharing-media');
  338. Route::view('your-profile', 'site.help.your-profile')->name('help.your-profile');
  339. Route::view('stories', 'site.help.stories')->name('help.stories');
  340. Route::view('embed', 'site.help.embed')->name('help.embed');
  341. Route::view('hashtags', 'site.help.hashtags')->name('help.hashtags');
  342. Route::view('instance-actor', 'site.help.instance-actor')->name('help.instance-actor');
  343. Route::view('discover', 'site.help.discover')->name('help.discover');
  344. Route::view('direct-messages', 'site.help.dm')->name('help.dm');
  345. Route::view('timelines', 'site.help.timelines')->name('help.timelines');
  346. Route::view('what-is-the-fediverse', 'site.help.what-is-fediverse')->name('help.what-is-fediverse');
  347. Route::view('safety-tips', 'site.help.safety-tips')->name('help.safety-tips');
  348. Route::get('community-guidelines', 'SiteController@communityGuidelines')->name('help.community-guidelines');
  349. Route::view('controlling-visibility', 'site.help.controlling-visibility')->name('help.controlling-visibility');
  350. Route::view('blocking-accounts', 'site.help.blocking-accounts')->name('help.blocking-accounts');
  351. Route::view('report-something', 'site.help.report-something')->name('help.report-something');
  352. Route::view('data-policy', 'site.help.data-policy')->name('help.data-policy');
  353. Route::view('labs-deprecation', 'site.help.labs-deprecation')->name('help.labs-deprecation');
  354. Route::view('tagging-people', 'site.help.tagging-people')->name('help.tagging-people');
  355. Route::view('licenses', 'site.help.licenses')->name('help.licenses');
  356. Route::view('instance-max-users-limit', 'site.help.instance-max-users')->name('help.instance-max-users-limit');
  357. Route::view('import', 'site.help.import')->name('help.import');
  358. Route::view('parental-controls', 'site.help.parental-controls');
  359. Route::view('email-confirmation-issues', 'site.help.email-confirmation-issues')->name('help.email-confirmation-issues');
  360. Route::view('curated-onboarding', 'site.help.curated-onboarding')->name('help.curated-onboarding');
  361. Route::view('account-migration', 'site.help.account-migration')->name('help.account-migration');
  362. });
  363. Route::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show');
  364. Route::get('newsroom/archive', 'NewsroomController@archive');
  365. Route::get('newsroom/search', 'NewsroomController@search');
  366. Route::get('newsroom', 'NewsroomController@index');
  367. Route::get('legal-notice', 'SiteController@legalNotice');
  368. });
  369. Route::group(['prefix' => 'timeline'], function () {
  370. Route::redirect('/', '/');
  371. Route::get('public', 'TimelineController@local')->name('timeline.public');
  372. Route::get('network', 'TimelineController@network')->name('timeline.network');
  373. });
  374. Route::group(['prefix' => 'users'], function () {
  375. Route::redirect('/', '/');
  376. Route::get('{user}.atom', 'ProfileController@showAtomFeed')->where('user', '.*');
  377. Route::get('{username}/outbox', 'FederationController@userOutbox');
  378. Route::get('{username}/followers', 'FederationController@userFollowers');
  379. Route::get('{username}/following', 'FederationController@userFollowing');
  380. Route::get('{username}', 'ProfileController@permalinkRedirect');
  381. });
  382. Route::group(['prefix' => 'installer'], function() {
  383. Route::get('api/requirements', 'InstallController@getRequirements')->withoutMiddleware(['web']);
  384. Route::post('precheck/database', 'InstallController@precheckDatabase')->withoutMiddleware(['web']);
  385. Route::post('store', 'InstallController@store')->withoutMiddleware(['web']);
  386. Route::get('/', 'InstallController@index')->withoutMiddleware(['web']);
  387. Route::get('/{q}', 'InstallController@index')->withoutMiddleware(['web'])->where('q', '.*');
  388. });
  389. Route::group(['prefix' => 'e'], function() {
  390. Route::get('terms', 'MobileController@terms');
  391. Route::get('privacy', 'MobileController@privacy');
  392. });
  393. Route::get('auth/invite/a/{code}', 'AdminInviteController@index');
  394. Route::post('api/v1.1/auth/invite/admin/re', 'AdminInviteController@apiRegister')->middleware('throttle:5,1440');
  395. Route::redirect('groups/', '/groups/home');
  396. Route::redirect('groups/home', '/groups/feed');
  397. Route::prefix('groups')->group(function() {
  398. // Route::get('feed', 'GroupController@index');
  399. Route::get('{id}/invite/claim', 'GroupController@groupInviteClaim');
  400. Route::get('{id}/invite', 'GroupController@groupInviteLanding');
  401. Route::get('{id}/settings', 'GroupController@groupSettings');
  402. Route::get('{gid}/topics/{topic}', 'Groups\GroupsTopicController@showTopicFeed');
  403. Route::get('{gid}/p/{sid}.json', 'GroupController@getStatusObject');
  404. Route::get('{gid}/p/{sid}', 'GroupController@showStatus');
  405. Route::get('{id}/user/{pid}', 'GroupController@showProfile');
  406. Route::get('{id}/un/{pid}', 'GroupController@showProfile');
  407. Route::get('{id}/username/{pid}', 'GroupController@showProfileByUsername');
  408. Route::get('{id}/{path}', 'GroupController@show');
  409. Route::get('{id}.json', 'GroupController@getGroupObject');
  410. Route::get('feed', 'GroupController@index');
  411. Route::get('create', 'GroupController@index');
  412. Route::get('discover', 'GroupController@index');
  413. Route::get('search', 'GroupController@index');
  414. Route::get('joins', 'GroupController@index');
  415. Route::get('notifications', 'GroupController@index');
  416. Route::get('{id}', 'GroupController@show');
  417. });
  418. Route::get('g/{hid}', 'GroupController@groupShortLinkRedirect');
  419. Route::get('stories/{username}', 'ProfileController@stories');
  420. Route::get('p/{id}', 'StatusController@shortcodeRedirect');
  421. Route::get('c/{collection}', 'CollectionController@show');
  422. Route::get('p/{username}/{id}/c', 'CommentController@showAll');
  423. Route::get('p/{username}/{id}/embed', 'StatusController@showEmbed');
  424. Route::get('p/{username}/{id}/edit', 'StatusController@edit');
  425. Route::post('p/{username}/{id}/edit', 'StatusController@editStore');
  426. Route::get('p/{username}/{id}.json', 'StatusController@showObject');
  427. Route::get('p/{username}/{id}', 'StatusController@show');
  428. Route::get('{username}/embed', 'ProfileController@embed');
  429. Route::get('{username}/live', 'LiveStreamController@showProfilePlayer');
  430. Route::get('@{username}@{domain}', 'SiteController@legacyWebfingerRedirect');
  431. Route::get('@{username}', 'SiteController@legacyProfileRedirect');
  432. Route::get('{username}', 'ProfileController@show');
  433. });