pixelfed/routes/web.php

427 lines
29 KiB
PHP
Raw Normal View History

2018-04-15 23:56:48 +00:00
<?php
2018-08-28 03:07:36 +00:00
Route::domain(config('pixelfed.domain.admin'))->prefix('i/admin')->group(function () {
Route::redirect('/', '/dashboard');
Route::redirect('timeline', config('app.url').'/timeline');
Route::get('dashboard', 'AdminController@home')->name('admin.home');
2018-09-01 02:26:56 +00:00
Route::get('reports', 'AdminController@reports')->name('admin.reports');
Route::get('reports/show/{id}', 'AdminController@showReport');
Route::post('reports/show/{id}', 'AdminController@updateReport');
2018-09-02 03:50:27 +00:00
Route::post('reports/bulk', 'AdminController@bulkUpdateReport');
2018-08-28 03:07:36 +00:00
Route::redirect('statuses', '/statuses/list');
Route::get('statuses/list', 'AdminController@statuses')->name('admin.statuses');
Route::get('statuses/show/{id}', 'AdminController@showStatus');
2019-02-11 05:04:09 +00:00
Route::redirect('profiles', '/i/admin/profiles/list');
Route::get('profiles/list', 'AdminController@profiles')->name('admin.profiles');
2019-02-12 08:11:26 +00:00
Route::get('profiles/edit/{id}', 'AdminController@profileShow');
2018-08-28 03:07:36 +00:00
Route::redirect('users', '/users/list');
Route::get('users/list', 'AdminController@users')->name('admin.users');
2020-02-20 02:43:13 +00:00
Route::get('users/show/{id}', 'AdminController@userShow');
Route::get('users/edit/{id}', 'AdminController@userEdit');
Route::post('users/edit/{id}', 'AdminController@userEditSubmit');
Route::get('users/activity/{id}', 'AdminController@userActivity');
Route::get('users/message/{id}', 'AdminController@userMessage');
Route::post('users/message/{id}', 'AdminController@userMessageSend');
Route::get('users/modtools/{id}', 'AdminController@userModTools');
Route::get('users/modlogs/{id}', 'AdminController@userModLogs');
Route::post('users/modlogs/{id}', 'AdminController@userModLogsMessage');
Route::get('users/delete/{id}', 'AdminController@userDelete');
Route::post('users/delete/{id}', 'AdminController@userDelete');
2020-02-20 04:18:39 +00:00
Route::post('users/moderation/update', 'AdminController@userModerate');
2019-02-11 05:04:09 +00:00
Route::get('media', 'AdminController@media')->name('admin.media');
Route::redirect('media/list', '/i/admin/media');
Route::get('media/show/{id}', 'AdminController@mediaShow');
Route::get('settings', 'AdminController@settings')->name('admin.settings');
Route::post('settings', 'AdminController@settingsHomeStore');
Route::get('settings/config', 'AdminController@settingsConfig')->name('admin.settings.config');
2019-06-21 02:01:16 +00:00
Route::post('settings/config', 'AdminController@settingsConfigStore');
Route::post('settings/config/restore', 'AdminController@settingsConfigRestore');
2019-02-11 05:04:09 +00:00
Route::get('settings/features', 'AdminController@settingsFeatures')->name('admin.settings.features');
Route::get('settings/pages', 'AdminController@settingsPages')->name('admin.settings.pages');
Route::get('settings/pages/edit', 'PageController@edit')->name('admin.settings.pages.edit');
Route::post('settings/pages/edit', 'PageController@store');
2019-06-20 02:55:04 +00:00
Route::post('settings/pages/delete', 'PageController@delete');
2019-06-19 20:31:14 +00:00
Route::post('settings/pages/create', 'PageController@generatePage');
2019-02-11 05:04:09 +00:00
Route::get('settings/maintenance', 'AdminController@settingsMaintenance')->name('admin.settings.maintenance');
Route::get('settings/backups', 'AdminController@settingsBackups')->name('admin.settings.backups');
Route::get('settings/storage', 'AdminController@settingsStorage')->name('admin.settings.storage');
Route::get('settings/system', 'AdminController@settingsSystem')->name('admin.settings.system');
Route::get('instances', 'AdminController@instances')->name('admin.instances');
Route::post('instances', 'AdminController@instanceScan');
Route::get('instances/show/{id}', 'AdminController@instanceShow');
Route::post('instances/edit/{id}', 'AdminController@instanceEdit');
Route::get('apps/home', 'AdminController@appsHome')->name('admin.apps');
Route::get('hashtags/home', 'AdminController@hashtagsHome')->name('admin.hashtags');
Route::get('discover/home', 'AdminController@discoverHome')->name('admin.discover');
Route::get('discover/category/create', 'AdminController@discoverCreateCategory')->name('admin.discover.create-category');
Route::post('discover/category/create', 'AdminController@discoverCreateCategoryStore');
Route::get('discover/category/edit/{id}', 'AdminController@discoverCategoryEdit');
Route::post('discover/category/edit/{id}', 'AdminController@discoverCategoryUpdate');
Route::post('discover/category/hashtag/create', 'AdminController@discoveryCategoryTagStore')->name('admin.discover.create-hashtag');
2019-06-19 01:15:25 +00:00
Route::get('messages/home', 'AdminController@messagesHome')->name('admin.messages');
2019-06-19 01:55:20 +00:00
Route::get('messages/show/{id}', 'AdminController@messagesShow');
Route::post('messages/mark-read', 'AdminController@messagesMarkRead');
2019-12-24 06:45:23 +00:00
Route::redirect('site-news', '/i/admin/newsroom');
Route::get('newsroom', 'AdminController@newsroomHome')->name('admin.newsroom.home');
Route::get('newsroom/create', 'AdminController@newsroomCreate')->name('admin.newsroom.create');
Route::get('newsroom/edit/{id}', 'AdminController@newsroomEdit');
Route::post('newsroom/edit/{id}', 'AdminController@newsroomUpdate');
Route::delete('newsroom/edit/{id}', 'AdminController@newsroomDelete');
Route::post('newsroom/create', 'AdminController@newsroomStore');
2018-04-15 23:56:48 +00:00
});
2018-04-16 00:00:49 +00:00
Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
2018-08-28 03:07:36 +00:00
Route::get('/', 'SiteController@home')->name('timeline.personal');
2019-01-07 03:29:46 +00:00
Route::post('/', 'StatusController@store');
2018-06-01 03:35:22 +00:00
2018-08-28 03:07:36 +00:00
Auth::routes();
2018-06-01 03:35:22 +00:00
2018-11-09 01:32:08 +00:00
Route::get('.well-known/webfinger', 'FederationController@webfinger')->name('well-known.webfinger');
Route::get('.well-known/nodeinfo', 'FederationController@nodeinfoWellKnown')->name('well-known.nodeinfo');
Route::get('.well-known/host-meta', 'FederationController@hostMeta')->name('well-known.hostMeta');
Route::redirect('.well-known/change-password', '/settings/password');
2018-06-01 03:35:22 +00:00
2018-08-28 03:07:36 +00:00
Route::get('/home', 'HomeController@index')->name('home');
2018-06-01 03:35:22 +00:00
2019-03-02 07:21:16 +00:00
Route::get('discover/c/{slug}', 'DiscoverController@showCategory');
2019-09-07 05:23:06 +00:00
Route::redirect('discover/personal', '/discover');
2018-08-28 03:07:36 +00:00
Route::get('discover', 'DiscoverController@home')->name('discover');
2019-05-26 00:56:21 +00:00
Route::get('discover/loops', 'DiscoverController@showLoops');
2019-11-24 23:08:56 +00:00
Route::get('discover/profiles', 'DiscoverController@profilesDirectory')->name('discover.profiles');
2019-03-02 07:21:16 +00:00
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'api'], function () {
2019-04-18 02:36:14 +00:00
Route::get('search', 'SearchController@searchAPI');
2018-08-28 03:07:36 +00:00
Route::get('nodeinfo/2.0.json', 'FederationController@nodeinfo');
2018-11-09 01:32:08 +00:00
Route::group(['prefix' => 'v2'], function() {
2019-03-25 03:34:54 +00:00
Route::get('config', 'ApiController@siteConfiguration');
2018-11-09 07:00:44 +00:00
Route::get('discover', 'InternalApiController@discover');
2019-09-27 01:46:45 +00:00
Route::get('discover/posts', 'InternalApiController@discoverPosts')->middleware('auth:api');
2018-11-20 02:47:34 +00:00
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
2018-12-02 05:06:03 +00:00
Route::get('likes/profile/{username}/status/{id}', 'PublicApiController@statusLikes');
Route::get('shares/profile/{username}/status/{id}', 'PublicApiController@statusShares');
2018-12-11 05:42:53 +00:00
Route::get('status/{id}/replies', 'InternalApiController@statusReplies');
2019-02-11 05:04:09 +00:00
Route::post('moderator/action', 'InternalApiController@modAction');
2019-03-02 07:21:16 +00:00
Route::get('discover/categories', 'InternalApiController@discoverCategories');
2019-06-03 19:13:19 +00:00
Route::get('loops', 'DiscoverController@loopsApi');
Route::post('loops/watch', 'DiscoverController@loopWatch');
2019-07-07 02:53:07 +00:00
Route::get('discover/tag', 'DiscoverController@getHashtags');
2019-08-23 04:41:56 +00:00
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
2018-11-09 01:32:08 +00:00
});
2019-09-16 00:44:32 +00:00
Route::group(['prefix' => 'pixelfed'], function() {
Route::group(['prefix' => 'v1'], function() {
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById');
2019-09-25 06:07:05 +00:00
Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch');
2019-09-16 00:44:32 +00:00
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
2019-09-25 07:17:25 +00:00
Route::post('accounts/{id}/block', 'Api\ApiV1Controller@accountBlockById');
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById');
2019-09-16 00:44:32 +00:00
Route::get('accounts/{id}', 'PublicApiController@account');
Route::post('avatar/update', 'ApiController@avatarUpdate');
2019-09-25 07:17:25 +00:00
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
2019-09-16 00:44:32 +00:00
Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia');
Route::delete('media', 'ApiController@deleteMedia');
Route::get('notifications', 'ApiController@notifications');
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
2019-12-24 06:45:23 +00:00
Route::get('newsroom/timeline', 'NewsroomController@timelineApi');
Route::post('newsroom/markasread', 'NewsroomController@markAsRead');
2019-09-16 00:44:32 +00:00
});
2019-09-27 01:46:45 +00:00
Route::group(['prefix' => 'v2'], function() {
Route::get('config', 'ApiController@siteConfiguration');
Route::get('discover', 'InternalApiController@discover');
Route::get('discover/posts', 'InternalApiController@discoverPosts');
2019-11-24 23:02:47 +00:00
Route::get('discover/profiles', 'DiscoverController@profilesDirectoryApi');
2019-09-27 01:46:45 +00:00
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
Route::get('likes/profile/{username}/status/{id}', 'PublicApiController@statusLikes');
Route::get('shares/profile/{username}/status/{id}', 'PublicApiController@statusShares');
Route::get('status/{id}/replies', 'InternalApiController@statusReplies');
Route::post('moderator/action', 'InternalApiController@modAction');
Route::get('discover/categories', 'InternalApiController@discoverCategories');
Route::get('loops', 'DiscoverController@loopsApi');
Route::post('loops/watch', 'DiscoverController@loopWatch');
Route::get('discover/tag', 'DiscoverController@getHashtags');
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
});
2019-09-16 00:44:32 +00:00
});
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'local'], function () {
2019-09-16 00:44:32 +00:00
// Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
// Route::get('accounts/relationships', 'PublicApiController@relationships');
// Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
// Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
// Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
// Route::get('accounts/{id}', 'PublicApiController@account');
// Route::post('avatar/update', 'ApiController@avatarUpdate');
// Route::get('likes', 'ApiController@hydrateLikes');
// Route::post('media', 'ApiController@uploadMedia');
// Route::delete('media', 'ApiController@deleteMedia');
// Route::get('notifications', 'ApiController@notifications');
// Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
// Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
2019-08-23 04:33:04 +00:00
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
2019-04-28 23:02:49 +00:00
Route::get('exp/rec', 'ApiController@userRecommendations');
2019-07-09 04:04:17 +00:00
Route::post('discover/tag/subscribe', 'HashtagFollowController@store')->middleware('throttle:maxHashtagFollowsPerHour,60')->middleware('throttle:maxHashtagFollowsPerDay,1440');;
Route::get('discover/tag/list', 'HashtagFollowController@getTags');
// Route::get('profile/sponsor/{id}', 'ProfileSponsorController@get');
2019-07-13 03:54:10 +00:00
Route::get('bookmarks', 'InternalApiController@bookmarks');
2019-07-18 00:56:34 +00:00
Route::get('collection/items/{id}', 'CollectionController@getItems');
Route::post('collection/item', 'CollectionController@storeId');
2019-12-08 07:51:31 +00:00
Route::delete('collection/item', 'CollectionController@deleteId');
2019-07-18 00:56:34 +00:00
Route::get('collection/{id}', 'CollectionController@get');
2019-07-18 03:10:59 +00:00
Route::post('collection/{id}', 'CollectionController@store');
2019-07-18 05:38:29 +00:00
Route::delete('collection/{id}', 'CollectionController@delete')->middleware('throttle:maxCollectionsPerHour,60')->middleware('throttle:maxCollectionsPerDay,1440')->middleware('throttle:maxCollectionsPerMonth,43800');
2019-07-18 02:07:52 +00:00
Route::post('collection/{id}/publish', 'CollectionController@publish')->middleware('throttle:maxCollectionsPerHour,60')->middleware('throttle:maxCollectionsPerDay,1440')->middleware('throttle:maxCollectionsPerMonth,43800');
2019-07-18 03:10:59 +00:00
Route::get('profile/collections/{id}', 'CollectionController@getUserCollections');
2019-09-02 00:44:38 +00:00
Route::post('compose/media/update/{id}', 'MediaController@composeUpdate')->middleware('throttle:maxComposeMediaUpdatesPerHour,60')->middleware('throttle:maxComposeMediaUpdatesPerDay,1440')->middleware('throttle:maxComposeMediaUpdatesPerMonth,43800');
Route::get('compose/location/search', 'ApiController@composeLocationSearch');
2018-08-28 03:07:36 +00:00
});
2019-08-23 04:33:04 +00:00
Route::group(['prefix' => 'admin'], function () {
Route::post('moderate', 'Api\AdminApiController@moderate');
});
2020-01-07 07:20:27 +00:00
Route::group(['prefix' => 'stories'], function () {
Route::get('v0/recent', 'StoryController@apiV1Recent');
Route::post('v0/add', 'StoryController@apiV1Add')->middleware('throttle:maxStoriesPerDay,1440');
Route::get('v0/fetch/{id}', 'StoryController@apiV1Fetch');
Route::get('v0/profile/{id}', 'StoryController@apiV1Profile');
Route::get('v0/exists/{id}', 'StoryController@apiV1Exists');
Route::delete('v0/delete/{id}', 'StoryController@apiV1Delete')->middleware('throttle:maxStoryDeletePerDay,1440');
2020-02-05 06:18:51 +00:00
Route::get('v0/me', 'StoryController@apiV1Me');
Route::get('v0/item/{id}', 'StoryController@apiV1Item');
2020-01-07 07:20:27 +00:00
});
2019-08-23 04:33:04 +00:00
2018-08-28 03:07:36 +00:00
});
2018-06-01 03:35:22 +00:00
2018-08-28 03:07:36 +00:00
Route::get('discover/tags/{hashtag}', 'DiscoverController@showTags');
2019-09-02 00:44:38 +00:00
Route::get('discover/places', 'PlaceController@directoryHome')->name('discover.places');
Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
Route::get('discover/location/country/{country}', 'PlaceController@directoryCities');
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'i'], function () {
Route::redirect('/', '/');
Route::get('compose', 'StatusController@compose')->name('compose');
2019-06-19 08:45:51 +00:00
Route::post('comment', 'CommentController@store')->middleware('throttle:maxCommentsPerHour,60')->middleware('throttle:maxCommentsPerDay,1440');
2019-01-07 03:29:46 +00:00
Route::post('delete', 'StatusController@delete');
2018-12-11 03:41:41 +00:00
Route::post('mute', 'AccountController@mute');
2019-04-08 03:10:00 +00:00
Route::post('unmute', 'AccountController@unmute');
2018-12-11 03:41:41 +00:00
Route::post('block', 'AccountController@block');
2019-04-08 03:10:00 +00:00
Route::post('unblock', 'AccountController@unblock');
2019-06-19 19:19:19 +00:00
Route::post('like', 'LikeController@store')->middleware('throttle:maxLikesPerHour,60')->middleware('throttle:maxLikesPerDay,1440');
Route::post('share', 'StatusController@storeShare')->middleware('throttle:maxSharesPerHour,60')->middleware('throttle:maxSharesPerDay,1440');
2019-01-07 03:29:46 +00:00
Route::post('follow', 'FollowerController@store');
Route::post('bookmark', 'BookmarkController@store');
2018-08-28 03:07:36 +00:00
Route::get('lang/{locale}', 'SiteController@changeLocale');
2018-12-25 06:02:29 +00:00
Route::get('restored', 'AccountController@accountRestored');
2018-09-17 01:54:35 +00:00
2018-08-28 03:07:36 +00:00
Route::get('verify-email', 'AccountController@verifyEmail');
2019-01-07 03:29:46 +00:00
Route::post('verify-email', 'AccountController@sendVerifyEmail');
Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail');
2018-08-28 03:07:36 +00:00
2018-09-10 05:12:51 +00:00
Route::get('auth/sudo', 'AccountController@sudoMode');
Route::post('auth/sudo', 'AccountController@sudoModeVerify');
2018-09-17 01:54:35 +00:00
Route::get('auth/checkpoint', 'AccountController@twoFactorCheckpoint');
Route::post('auth/checkpoint', 'AccountController@twoFactorVerify');
2018-09-10 05:12:51 +00:00
2019-10-15 04:53:53 +00:00
Route::get('media/preview/{profileId}/{mediaId}/{timestamp}', 'ApiController@showTempMedia')->name('temp-media');
2018-10-23 01:53:24 +00:00
2019-04-03 04:56:18 +00:00
Route::get('results', 'SearchController@results');
Route::post('visibility', 'StatusController@toggleVisibility');
2018-10-23 01:53:24 +00:00
2019-04-22 05:44:02 +00:00
Route::post('metro/dark-mode', 'SettingsController@metroDarkMode');
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'report'], function () {
Route::get('/', 'ReportController@showForm')->name('report.form');
2019-01-07 03:29:46 +00:00
Route::post('/', 'ReportController@formStore');
2018-08-28 03:07:36 +00:00
Route::get('not-interested', 'ReportController@notInterestedForm')->name('report.not-interested');
Route::get('spam', 'ReportController@spamForm')->name('report.spam');
Route::get('spam/comment', 'ReportController@spamCommentForm')->name('report.spam.comment');
Route::get('spam/post', 'ReportController@spamPostForm')->name('report.spam.post');
Route::get('spam/profile', 'ReportController@spamProfileForm')->name('report.spam.profile');
Route::get('sensitive/comment', 'ReportController@sensitiveCommentForm')->name('report.sensitive.comment');
Route::get('sensitive/post', 'ReportController@sensitivePostForm')->name('report.sensitive.post');
Route::get('sensitive/profile', 'ReportController@sensitiveProfileForm')->name('report.sensitive.profile');
Route::get('abusive/comment', 'ReportController@abusiveCommentForm')->name('report.abusive.comment');
Route::get('abusive/post', 'ReportController@abusivePostForm')->name('report.abusive.post');
Route::get('abusive/profile', 'ReportController@abusiveProfileForm')->name('report.abusive.profile');
});
2019-07-18 00:56:34 +00:00
Route::get('collections/create', 'CollectionController@create');
2019-08-06 03:21:32 +00:00
Route::get('me', 'ProfileController@meRedirect');
2019-12-05 03:26:11 +00:00
Route::get('intent/follow', 'SiteController@followIntent');
2020-01-07 07:20:27 +00:00
Route::post('stories/viewed', 'StoryController@apiV1Viewed');
Route::get('stories/new', 'StoryController@compose');
Route::get('my/story', 'StoryController@iRedirect');
2018-08-28 03:07:36 +00:00
});
2018-06-01 03:35:22 +00:00
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'account'], function () {
Route::redirect('/', '/');
Route::get('activity', 'AccountController@notifications')->name('notifications');
2018-09-03 04:05:44 +00:00
Route::get('follow-requests', 'AccountController@followRequests')->name('follow-requests');
Route::post('follow-requests', 'AccountController@followRequestHandle');
2018-08-28 03:07:36 +00:00
});
2018-08-10 05:20:27 +00:00
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'settings'], function () {
Route::redirect('/', '/settings/home');
2018-09-17 01:54:35 +00:00
Route::get('home', 'SettingsController@home')
->name('settings');
2019-01-07 03:29:46 +00:00
Route::post('home', 'SettingsController@homeUpdate');
2018-08-28 03:07:36 +00:00
Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar');
2018-12-26 22:51:53 +00:00
Route::post('avatar', 'AvatarController@store');
2019-04-06 22:46:06 +00:00
Route::delete('avatar', 'AvatarController@deleteAvatar');
2018-09-10 05:12:51 +00:00
Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone');
2019-01-07 03:29:46 +00:00
Route::post('password', 'SettingsController@passwordUpdate')->middleware('dangerzone');
2018-08-28 03:07:36 +00:00
Route::get('email', 'SettingsController@email')->name('settings.email');
2019-06-17 03:48:58 +00:00
Route::post('email', 'SettingsController@emailUpdate');
2018-08-28 03:07:36 +00:00
Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications');
Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy');
2019-01-07 03:29:46 +00:00
Route::post('privacy', 'SettingsController@privacyStore');
2018-08-31 04:28:09 +00:00
Route::get('privacy/muted-users', 'SettingsController@mutedUsers')->name('settings.privacy.muted-users');
2019-01-07 03:29:46 +00:00
Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate');
2018-08-31 04:28:09 +00:00
Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users');
2019-01-07 03:29:46 +00:00
Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate');
2018-08-31 04:28:09 +00:00
Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances');
2019-06-24 02:35:56 +00:00
Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore')->middleware('throttle:maxInstanceBansPerDay,1440');
2019-02-11 05:04:09 +00:00
Route::post('privacy/blocked-instances/unblock', 'SettingsController@blockedInstanceUnblock')->name('settings.privacy.blocked-instances.unblock');
Route::get('privacy/blocked-keywords', 'SettingsController@blockedKeywords')->name('settings.privacy.blocked-keywords');
2019-06-27 02:04:00 +00:00
Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account');
2019-02-11 05:04:09 +00:00
Route::get('reports', 'SettingsController@reportsHome')->name('settings.reports');
2018-12-25 06:02:29 +00:00
Route::group(['prefix' => 'remove', 'middleware' => 'dangerzone'], function() {
Route::get('request/temporary', 'SettingsController@removeAccountTemporary')->name('settings.remove.temporary');
Route::post('request/temporary', 'SettingsController@removeAccountTemporarySubmit');
Route::get('request/permanent', 'SettingsController@removeAccountPermanent')->name('settings.remove.permanent');
Route::post('request/permanent', 'SettingsController@removeAccountPermanentSubmit');
});
2018-12-21 06:18:48 +00:00
2018-09-17 01:54:35 +00:00
Route::group(['prefix' => 'security', 'middleware' => 'dangerzone'], function() {
Route::get(
'/',
'SettingsController@security'
)->name('settings.security');
Route::get(
'2fa/setup',
'SettingsController@securityTwoFactorSetup'
)->name('settings.security.2fa.setup');
Route::post(
'2fa/setup',
'SettingsController@securityTwoFactorSetupStore'
);
Route::get(
'2fa/edit',
'SettingsController@securityTwoFactorEdit'
)->name('settings.security.2fa.edit');
Route::post(
'2fa/edit',
'SettingsController@securityTwoFactorUpdate'
);
Route::get(
'2fa/recovery-codes',
'SettingsController@securityTwoFactorRecoveryCodes'
)->name('settings.security.2fa.recovery');
2018-12-28 04:33:15 +00:00
Route::post(
'2fa/recovery-codes',
'SettingsController@securityTwoFactorRecoveryCodesRegenerate'
);
2019-06-16 22:42:07 +00:00
2018-09-17 01:54:35 +00:00
});
2019-02-11 05:04:09 +00:00
Route::get('applications', 'SettingsController@applications')->name('settings.applications')->middleware('dangerzone');
2019-04-22 05:44:02 +00:00
Route::get('data-export', 'SettingsController@dataExport')->name('settings.dataexport')->middleware('dangerzone');
Route::post('data-export/following', 'SettingsController@exportFollowing')->middleware('dangerzone');
Route::post('data-export/followers', 'SettingsController@exportFollowers')->middleware('dangerzone');
Route::post('data-export/mute-block-list', 'SettingsController@exportMuteBlockList')->middleware('dangerzone');
2019-04-24 19:50:47 +00:00
Route::post('data-export/account', 'SettingsController@exportAccount')->middleware('dangerzone');
2019-04-25 03:08:35 +00:00
Route::post('data-export/statuses', 'SettingsController@exportStatuses')->middleware('dangerzone');
2019-02-11 05:04:09 +00:00
Route::get('developers', 'SettingsController@developers')->name('settings.developers')->middleware('dangerzone');
2019-04-28 23:02:49 +00:00
Route::get('labs', 'SettingsController@labs')->name('settings.labs');
Route::post('labs', 'SettingsController@labsStore');
2019-06-13 02:21:32 +00:00
2019-06-16 22:42:07 +00:00
Route::get('accessibility', 'SettingsController@accessibility')->name('settings.accessibility');
Route::post('accessibility', 'SettingsController@accessibilityStore');
2019-06-13 02:21:32 +00:00
Route::group(['prefix' => 'relationships'], function() {
Route::redirect('/', '/settings/relationships/home');
Route::get('home', 'SettingsController@relationshipsHome')->name('settings.relationships');
});
2019-06-16 22:42:07 +00:00
Route::get('invites/create', 'UserInviteController@create')->name('settings.invites.create');
Route::post('invites/create', 'UserInviteController@store');
Route::get('invites', 'UserInviteController@show')->name('settings.invites');
// Route::get('sponsor', 'SettingsController@sponsor')->name('settings.sponsor');
// Route::post('sponsor', 'SettingsController@sponsorStore');
2018-08-10 05:20:27 +00:00
});
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'site'], function () {
Route::redirect('/', '/');
Route::get('about', 'SiteController@about')->name('site.about');
Route::view('help', 'site.help')->name('site.help');
Route::view('developer-api', 'site.developer')->name('site.developers');
Route::view('fediverse', 'site.fediverse')->name('site.fediverse');
Route::view('open-source', 'site.opensource')->name('site.opensource');
Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
2019-06-20 02:55:04 +00:00
Route::get('terms', 'SiteController@terms')->name('site.terms');
Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
2018-08-28 03:07:36 +00:00
Route::view('platform', 'site.platform')->name('site.platform');
Route::view('language', 'site.language')->name('site.language');
2019-06-18 20:21:06 +00:00
Route::get('contact', 'ContactController@show')->name('site.contact');
Route::post('contact', 'ContactController@store');
2018-10-22 01:46:43 +00:00
Route::group(['prefix'=>'kb'], function() {
Route::view('getting-started', 'site.help.getting-started')->name('help.getting-started');
Route::view('sharing-media', 'site.help.sharing-media')->name('help.sharing-media');
Route::view('your-profile', 'site.help.your-profile')->name('help.your-profile');
Route::view('stories', 'site.help.stories')->name('help.stories');
Route::view('embed', 'site.help.embed')->name('help.embed');
Route::view('hashtags', 'site.help.hashtags')->name('help.hashtags');
Route::view('discover', 'site.help.discover')->name('help.discover');
Route::view('direct-messages', 'site.help.dm')->name('help.dm');
Route::view('timelines', 'site.help.timelines')->name('help.timelines');
Route::view('what-is-the-fediverse', 'site.help.what-is-fediverse')->name('help.what-is-fediverse');
Route::view('safety-tips', 'site.help.safety-tips')->name('help.safety-tips');
2019-02-11 05:04:09 +00:00
Route::get('community-guidelines', 'SiteController@communityGuidelines')->name('help.community-guidelines');
2018-10-22 01:46:43 +00:00
Route::view('controlling-visibility', 'site.help.controlling-visibility')->name('help.controlling-visibility');
Route::view('blocking-accounts', 'site.help.blocking-accounts')->name('help.blocking-accounts');
Route::view('report-something', 'site.help.report-something')->name('help.report-something');
Route::view('data-policy', 'site.help.data-policy')->name('help.data-policy');
});
2019-12-24 06:45:23 +00:00
Route::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show');
Route::get('newsroom/archive', 'NewsroomController@archive');
Route::get('newsroom/search', 'NewsroomController@search');
Route::get('newsroom', 'NewsroomController@index');
2018-08-10 05:20:27 +00:00
});
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'timeline'], function () {
Route::redirect('/', '/');
Route::get('public', 'TimelineController@local')->name('timeline.public');
2018-06-01 03:35:22 +00:00
});
2018-08-10 05:20:27 +00:00
2018-08-28 03:07:36 +00:00
Route::group(['prefix' => 'users'], function () {
Route::redirect('/', '/');
Route::get('{user}.atom', 'ProfileController@showAtomFeed');
Route::get('{username}/outbox', 'FederationController@userOutbox');
2018-11-09 01:32:08 +00:00
Route::get('{username}/followers', 'FederationController@userFollowers');
Route::get('{username}/following', 'FederationController@userFollowing');
2019-09-20 02:28:11 +00:00
Route::get('{username}', 'ProfileController@permalinkRedirect');
2018-08-28 03:07:36 +00:00
});
2020-01-07 07:20:27 +00:00
Route::get('stories/{username}', 'ProfileController@stories');
2019-07-18 00:56:34 +00:00
Route::get('c/{collection}', 'CollectionController@show');
2018-08-28 03:07:36 +00:00
Route::get('p/{username}/{id}/c', 'CommentController@showAll');
2019-11-24 04:44:41 +00:00
Route::get('p/{username}/{id}/embed', 'StatusController@showEmbed');
2018-08-28 03:07:36 +00:00
Route::get('p/{username}/{id}/edit', 'StatusController@edit');
Route::post('p/{username}/{id}/edit', 'StatusController@editStore')->middleware('throttle:maxPostEditsPerHour,60')->middleware('throttle:maxPostEditsPerDay,1440');
2019-09-07 03:21:28 +00:00
Route::get('p/{username}/{id}.json', 'StatusController@showObject');
2018-08-28 03:07:36 +00:00
Route::get('p/{username}/{id}', 'StatusController@show');
2019-12-05 04:21:08 +00:00
Route::get('{username}/embed', 'ProfileController@embed');
2018-08-28 03:07:36 +00:00
Route::get('{username}', 'ProfileController@show');
});