mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-24 23:35:23 +00:00
commit
ccbba91e70
5 changed files with 677 additions and 640 deletions
|
@ -23,8 +23,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
|
||||||
|
|
||||||
parent::boot();
|
parent::boot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,10 +34,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
public function map()
|
public function map()
|
||||||
{
|
{
|
||||||
$this->mapApiRoutes();
|
$this->mapApiRoutes();
|
||||||
|
|
||||||
$this->mapWebRoutes();
|
$this->mapWebRoutes();
|
||||||
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +46,18 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
protected function mapWebRoutes()
|
protected function mapWebRoutes()
|
||||||
{
|
{
|
||||||
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/web-admin.php'));
|
||||||
|
|
||||||
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/web-portfolio.php'));
|
||||||
|
|
||||||
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/web-api.php'));
|
||||||
|
|
||||||
Route::middleware('web')
|
Route::middleware('web')
|
||||||
->namespace($this->namespace)
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/web.php'));
|
->group(base_path('routes/web.php'));
|
||||||
|
|
166
routes/web-admin.php
Normal file
166
routes/web-admin.php
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
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');
|
||||||
|
Route::get('stats', 'AdminController@stats')->name('admin.stats');
|
||||||
|
Route::get('reports', 'AdminController@reports')->name('admin.reports');
|
||||||
|
Route::get('reports/show/{id}', 'AdminController@showReport');
|
||||||
|
Route::post('reports/show/{id}', 'AdminController@updateReport');
|
||||||
|
Route::post('reports/bulk', 'AdminController@bulkUpdateReport');
|
||||||
|
Route::get('reports/autospam/{id}', 'AdminController@showSpam');
|
||||||
|
Route::post('reports/autospam/sync', 'AdminController@fixUncategorizedSpam');
|
||||||
|
Route::post('reports/autospam/{id}', 'AdminController@updateSpam');
|
||||||
|
Route::get('reports/autospam', 'AdminController@spam');
|
||||||
|
Route::get('reports/appeals', 'AdminController@appeals');
|
||||||
|
Route::get('reports/appeal/{id}', 'AdminController@showAppeal');
|
||||||
|
Route::post('reports/appeal/{id}', 'AdminController@updateAppeal');
|
||||||
|
Route::get('reports/email-verifications', 'AdminController@reportMailVerifications');
|
||||||
|
Route::post('reports/email-verifications/ignore', 'AdminController@reportMailVerifyIgnore');
|
||||||
|
Route::post('reports/email-verifications/approve', 'AdminController@reportMailVerifyApprove');
|
||||||
|
Route::post('reports/email-verifications/clear-ignored', 'AdminController@reportMailVerifyClearIgnored');
|
||||||
|
Route::redirect('stories', '/stories/list');
|
||||||
|
Route::get('stories/list', 'AdminController@stories')->name('admin.stories');
|
||||||
|
Route::redirect('statuses', '/statuses/list');
|
||||||
|
Route::get('statuses/list', 'AdminController@statuses')->name('admin.statuses');
|
||||||
|
Route::get('statuses/show/{id}', 'AdminController@showStatus');
|
||||||
|
Route::redirect('profiles', '/i/admin/profiles/list');
|
||||||
|
Route::get('profiles/list', 'AdminController@profiles')->name('admin.profiles');
|
||||||
|
Route::get('profiles/edit/{id}', 'AdminController@profileShow');
|
||||||
|
Route::redirect('users', '/users/list');
|
||||||
|
Route::get('users/list', 'AdminController@users')->name('admin.users');
|
||||||
|
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::post('users/modlogs/{id}/delete', 'AdminController@userModLogDelete');
|
||||||
|
Route::get('users/delete/{id}', 'AdminController@userDelete');
|
||||||
|
Route::post('users/delete/{id}', 'AdminController@userDeleteProcess');
|
||||||
|
Route::post('users/moderation/update', 'AdminController@userModerate');
|
||||||
|
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/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');
|
||||||
|
Route::post('settings/pages/delete', 'PageController@delete');
|
||||||
|
Route::post('settings/pages/create', 'PageController@generatePage');
|
||||||
|
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');
|
||||||
|
|
||||||
|
Route::get('messages/home', 'AdminController@messagesHome')->name('admin.messages');
|
||||||
|
Route::get('messages/show/{id}', 'AdminController@messagesShow');
|
||||||
|
Route::post('messages/mark-read', 'AdminController@messagesMarkRead');
|
||||||
|
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');
|
||||||
|
|
||||||
|
Route::get('diagnostics/home', 'AdminController@diagnosticsHome')->name('admin.diagnostics');
|
||||||
|
Route::post('diagnostics/decrypt', 'AdminController@diagnosticsDecrypt')->name('admin.diagnostics.decrypt');
|
||||||
|
Route::get('custom-emoji/home', 'AdminController@customEmojiHome')->name('admin.custom-emoji');
|
||||||
|
Route::post('custom-emoji/toggle-active/{id}', 'AdminController@customEmojiToggleActive');
|
||||||
|
Route::get('custom-emoji/new', 'AdminController@customEmojiAdd');
|
||||||
|
Route::post('custom-emoji/new', 'AdminController@customEmojiStore');
|
||||||
|
Route::post('custom-emoji/delete/{id}', 'AdminController@customEmojiDelete');
|
||||||
|
Route::get('custom-emoji/duplicates/{id}', 'AdminController@customEmojiShowDuplicates');
|
||||||
|
|
||||||
|
Route::get('directory/home', 'AdminController@directoryHome')->name('admin.directory');
|
||||||
|
|
||||||
|
Route::get('autospam/home', 'AdminController@autospamHome')->name('admin.autospam');
|
||||||
|
|
||||||
|
Route::redirect('asf/', 'asf/home');
|
||||||
|
Route::get('asf/home', 'AdminShadowFilterController@home');
|
||||||
|
Route::get('asf/create', 'AdminShadowFilterController@create');
|
||||||
|
Route::get('asf/edit/{id}', 'AdminShadowFilterController@edit');
|
||||||
|
Route::post('asf/edit/{id}', 'AdminShadowFilterController@storeEdit');
|
||||||
|
Route::post('asf/create', 'AdminShadowFilterController@store');
|
||||||
|
|
||||||
|
Route::get('asf/home', 'AdminShadowFilterController@home');
|
||||||
|
// Route::redirect('curated-onboarding/', 'curated-onboarding/home');
|
||||||
|
// Route::get('curated-onboarding/home', 'AdminCuratedRegisterController@index')->name('admin.curated-onboarding');
|
||||||
|
// Route::get('curated-onboarding/show/{id}/preview-details-message', 'AdminCuratedRegisterController@previewDetailsMessageShow');
|
||||||
|
// Route::get('curated-onboarding/show/{id}/preview-message', 'AdminCuratedRegisterController@previewMessageShow');
|
||||||
|
// Route::get('curated-onboarding/show/{id}', 'AdminCuratedRegisterController@show');
|
||||||
|
|
||||||
|
Route::prefix('api')->group(function() {
|
||||||
|
Route::get('stats', 'AdminController@getStats');
|
||||||
|
Route::get('accounts', 'AdminController@getAccounts');
|
||||||
|
Route::get('posts', 'AdminController@getPosts');
|
||||||
|
Route::get('instances', 'AdminController@getInstances');
|
||||||
|
Route::post('directory/save', 'AdminController@directoryStore');
|
||||||
|
Route::get('directory/initial-data', 'AdminController@directoryInitialData');
|
||||||
|
Route::get('directory/popular-posts', 'AdminController@directoryGetPopularPosts');
|
||||||
|
Route::post('directory/add-by-id', 'AdminController@directoryGetAddPostByIdSearch');
|
||||||
|
Route::delete('directory/banner-image', 'AdminController@directoryDeleteBannerImage');
|
||||||
|
Route::post('directory/submit', 'AdminController@directoryHandleServerSubmission');
|
||||||
|
Route::post('directory/testimonial/save', 'AdminController@directorySaveTestimonial');
|
||||||
|
Route::post('directory/testimonial/delete', 'AdminController@directoryDeleteTestimonial');
|
||||||
|
Route::post('directory/testimonial/update', 'AdminController@directoryUpdateTestimonial');
|
||||||
|
Route::get('hashtags/stats', 'AdminController@hashtagsStats');
|
||||||
|
Route::get('hashtags/query', 'AdminController@hashtagsApi');
|
||||||
|
Route::get('hashtags/get', 'AdminController@hashtagsGet');
|
||||||
|
Route::post('hashtags/update', 'AdminController@hashtagsUpdate');
|
||||||
|
Route::post('hashtags/clear-trending-cache', 'AdminController@hashtagsClearTrendingCache');
|
||||||
|
Route::get('instances/get', 'AdminController@getInstancesApi');
|
||||||
|
Route::get('instances/stats', 'AdminController@getInstancesStatsApi');
|
||||||
|
Route::get('instances/query', 'AdminController@getInstancesQueryApi');
|
||||||
|
Route::post('instances/update', 'AdminController@postInstanceUpdateApi');
|
||||||
|
Route::post('instances/create', 'AdminController@postInstanceCreateNewApi');
|
||||||
|
Route::post('instances/delete', 'AdminController@postInstanceDeleteApi');
|
||||||
|
Route::post('instances/refresh-stats', 'AdminController@postInstanceRefreshStatsApi');
|
||||||
|
Route::get('instances/download-backup', 'AdminController@downloadBackup');
|
||||||
|
Route::post('instances/import-data', 'AdminController@importBackup');
|
||||||
|
Route::get('reports/stats', 'AdminController@reportsStats');
|
||||||
|
Route::get('reports/all', 'AdminController@reportsApiAll');
|
||||||
|
Route::get('reports/get/{id}', 'AdminController@reportsApiGet');
|
||||||
|
Route::post('reports/handle', 'AdminController@reportsApiHandle');
|
||||||
|
Route::get('reports/spam/all', 'AdminController@reportsApiSpamAll');
|
||||||
|
Route::get('reports/spam/get/{id}', 'AdminController@reportsApiSpamGet');
|
||||||
|
Route::post('reports/spam/handle', 'AdminController@reportsApiSpamHandle');
|
||||||
|
Route::post('autospam/config', 'AdminController@getAutospamConfigApi');
|
||||||
|
Route::post('autospam/reports/closed', 'AdminController@getAutospamReportsClosedApi');
|
||||||
|
Route::post('autospam/train', 'AdminController@postAutospamTrainSpamApi');
|
||||||
|
Route::post('autospam/search/non-spam', 'AdminController@postAutospamTrainNonSpamSearchApi');
|
||||||
|
Route::post('autospam/train/non-spam', 'AdminController@postAutospamTrainNonSpamSubmitApi');
|
||||||
|
Route::post('autospam/tokens/custom', 'AdminController@getAutospamCustomTokensApi');
|
||||||
|
Route::post('autospam/tokens/store', 'AdminController@saveNewAutospamCustomTokensApi');
|
||||||
|
Route::post('autospam/tokens/update', 'AdminController@updateAutospamCustomTokensApi');
|
||||||
|
Route::post('autospam/tokens/export', 'AdminController@exportAutospamCustomTokensApi');
|
||||||
|
Route::post('autospam/config/enable', 'AdminController@enableAutospamApi');
|
||||||
|
Route::post('autospam/config/disable', 'AdminController@disableAutospamApi');
|
||||||
|
// Route::get('instances/{id}/accounts', 'AdminController@getInstanceAccounts');
|
||||||
|
// Route::get('curated-onboarding/show/{id}/activity-log', 'AdminCuratedRegisterController@apiActivityLog');
|
||||||
|
// Route::post('curated-onboarding/show/{id}/message/preview', 'AdminCuratedRegisterController@apiMessagePreviewStore');
|
||||||
|
// Route::post('curated-onboarding/show/{id}/message/send', 'AdminCuratedRegisterController@apiMessageSendStore');
|
||||||
|
// Route::post('curated-onboarding/show/{id}/reject', 'AdminCuratedRegisterController@apiHandleReject');
|
||||||
|
// Route::post('curated-onboarding/show/{id}/approve', 'AdminCuratedRegisterController@apiHandleApprove');
|
||||||
|
});
|
||||||
|
});
|
168
routes/web-api.php
Normal file
168
routes/web-api.php
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
|
||||||
|
Route::group(['prefix' => 'api'], function () {
|
||||||
|
Route::get('search', 'SearchController@searchAPI');
|
||||||
|
Route::post('status/view', 'StatusController@storeView');
|
||||||
|
Route::get('v1/polls/{id}', 'PollController@getPoll');
|
||||||
|
Route::post('v1/polls/{id}/votes', 'PollController@vote');
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'compose'], function() {
|
||||||
|
Route::group(['prefix' => 'v0'], function() {
|
||||||
|
Route::post('/media/upload', 'ComposeController@mediaUpload');
|
||||||
|
Route::post('/media/update', 'ComposeController@mediaUpdate');
|
||||||
|
Route::delete('/media/delete', 'ComposeController@mediaDelete');
|
||||||
|
Route::get('/search/tag', 'ComposeController@searchTag');
|
||||||
|
Route::get('/search/location', 'ComposeController@searchLocation');
|
||||||
|
Route::get('/search/mention', 'ComposeController@searchMentionAutocomplete');
|
||||||
|
Route::get('/search/hashtag', 'ComposeController@searchHashtagAutocomplete');
|
||||||
|
|
||||||
|
Route::post('/publish', 'ComposeController@store');
|
||||||
|
Route::post('/publish/text', 'ComposeController@storeText');
|
||||||
|
Route::get('/media/processing', 'ComposeController@mediaProcessingCheck');
|
||||||
|
Route::get('/settings', 'ComposeController@composeSettings');
|
||||||
|
Route::post('/poll', 'ComposeController@createPoll');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'direct'], function () {
|
||||||
|
Route::get('browse', 'DirectMessageController@browse');
|
||||||
|
Route::post('create', 'DirectMessageController@create');
|
||||||
|
Route::get('thread', 'DirectMessageController@thread');
|
||||||
|
Route::post('mute', 'DirectMessageController@mute');
|
||||||
|
Route::post('unmute', 'DirectMessageController@unmute');
|
||||||
|
Route::delete('message', 'DirectMessageController@delete');
|
||||||
|
Route::post('media', 'DirectMessageController@mediaUpload');
|
||||||
|
Route::post('lookup', 'DirectMessageController@composeLookup');
|
||||||
|
Route::post('read', 'DirectMessageController@read');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'v2'], function() {
|
||||||
|
Route::get('config', 'ApiController@siteConfiguration');
|
||||||
|
Route::get('discover', 'InternalApiController@discover');
|
||||||
|
Route::get('discover/posts', 'InternalApiController@discoverPosts')->middleware('auth:api');
|
||||||
|
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
|
||||||
|
Route::get('profile/{username}/status/{postid}/state', 'PublicApiController@statusState');
|
||||||
|
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
|
||||||
|
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::get('statuses/{id}/replies', 'Api\ApiV1Controller@statusReplies');
|
||||||
|
Route::get('statuses/{id}/state', 'Api\ApiV1Controller@statusState');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'pixelfed'], function() {
|
||||||
|
Route::group(['prefix' => 'v1'], function() {
|
||||||
|
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
|
||||||
|
Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById');
|
||||||
|
Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch');
|
||||||
|
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
|
||||||
|
Route::post('accounts/{id}/block', 'Api\ApiV1Controller@accountBlockById');
|
||||||
|
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById');
|
||||||
|
Route::get('statuses/{id}', 'PublicApiController@getStatus');
|
||||||
|
Route::get('accounts/{id}', 'PublicApiController@account');
|
||||||
|
Route::post('avatar/update', 'ApiController@avatarUpdate');
|
||||||
|
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
|
||||||
|
Route::get('notifications', 'ApiController@notifications');
|
||||||
|
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
||||||
|
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
|
||||||
|
Route::get('timelines/network', 'PublicApiController@networkTimelineApi');
|
||||||
|
Route::get('newsroom/timeline', 'NewsroomController@timelineApi');
|
||||||
|
Route::post('newsroom/markasread', 'NewsroomController@markAsRead');
|
||||||
|
Route::get('favourites', 'Api\BaseApiController@accountLikes');
|
||||||
|
Route::get('mutes', 'AccountController@accountMutes');
|
||||||
|
Route::get('blocks', 'AccountController@accountBlocks');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'v2'], function() {
|
||||||
|
Route::get('config', 'ApiController@siteConfiguration');
|
||||||
|
Route::get('discover', 'InternalApiController@discover');
|
||||||
|
Route::get('discover/posts', 'InternalApiController@discoverPosts');
|
||||||
|
Route::get('discover/profiles', 'DiscoverController@profilesDirectoryApi');
|
||||||
|
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
|
||||||
|
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
|
||||||
|
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::get('discover/posts/trending', 'DiscoverController@trendingApi');
|
||||||
|
Route::get('discover/posts/hashtags', 'DiscoverController@trendingHashtags');
|
||||||
|
Route::get('discover/posts/places', 'DiscoverController@trendingPlaces');
|
||||||
|
Route::get('seasonal/yir', 'SeasonalController@getData');
|
||||||
|
Route::post('seasonal/yir', 'SeasonalController@store');
|
||||||
|
Route::get('mutes', 'AccountController@accountMutesV2');
|
||||||
|
Route::get('blocks', 'AccountController@accountBlocksV2');
|
||||||
|
Route::get('filters', 'AccountController@accountFiltersV2');
|
||||||
|
Route::post('status/compose', 'InternalApiController@composePost');
|
||||||
|
Route::get('status/{id}/replies', 'InternalApiController@statusReplies');
|
||||||
|
Route::post('status/{id}/archive', 'ApiController@archive');
|
||||||
|
Route::post('status/{id}/unarchive', 'ApiController@unarchive');
|
||||||
|
Route::get('statuses/archives', 'ApiController@archivedPosts');
|
||||||
|
Route::get('discover/memories', 'DiscoverController@myMemories');
|
||||||
|
Route::get('discover/account-insights', 'DiscoverController@accountInsightsPopularPosts');
|
||||||
|
Route::get('discover/server-timeline', 'DiscoverController@serverTimeline');
|
||||||
|
Route::get('discover/meta', 'DiscoverController@enabledFeatures');
|
||||||
|
Route::post('discover/admin/features', 'DiscoverController@updateFeatures');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('discover/accounts/popular', 'Api\ApiV1Controller@discoverAccountsPopular');
|
||||||
|
Route::post('web/change-language.json', 'SpaController@updateLanguage');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'local'], function () {
|
||||||
|
// Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
|
||||||
|
Route::get('exp/rec', 'ApiController@userRecommendations');
|
||||||
|
Route::post('discover/tag/subscribe', 'HashtagFollowController@store');
|
||||||
|
Route::get('discover/tag/list', 'HashtagFollowController@getTags');
|
||||||
|
// Route::get('profile/sponsor/{id}', 'ProfileSponsorController@get');
|
||||||
|
Route::get('bookmarks', 'InternalApiController@bookmarks');
|
||||||
|
Route::get('collection/items/{id}', 'CollectionController@getItems');
|
||||||
|
Route::post('collection/item', 'CollectionController@storeId');
|
||||||
|
Route::delete('collection/item', 'CollectionController@deleteId');
|
||||||
|
Route::get('collection/{id}', 'CollectionController@getCollection');
|
||||||
|
Route::post('collection/{id}', 'CollectionController@store');
|
||||||
|
Route::delete('collection/{id}', 'CollectionController@delete');
|
||||||
|
Route::post('collection/{id}/publish', 'CollectionController@publish');
|
||||||
|
Route::get('profile/collections/{id}', 'CollectionController@getUserCollections');
|
||||||
|
|
||||||
|
Route::post('compose/tag/untagme', 'MediaTagController@untagProfile');
|
||||||
|
|
||||||
|
Route::post('import/ig', 'ImportPostController@store');
|
||||||
|
Route::get('import/ig/config', 'ImportPostController@getConfig');
|
||||||
|
Route::post('import/ig/media', 'ImportPostController@storeMedia');
|
||||||
|
Route::post('import/ig/existing', 'ImportPostController@getImportedFiles');
|
||||||
|
Route::post('import/ig/posts', 'ImportPostController@getImportedPosts');
|
||||||
|
Route::post('import/ig/processing', 'ImportPostController@getProcessingCount');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'web/stories'], function () {
|
||||||
|
Route::get('v1/recent', 'StoryController@recent');
|
||||||
|
Route::get('v1/viewers', 'StoryController@viewers');
|
||||||
|
Route::get('v1/profile/{id}', 'StoryController@profile');
|
||||||
|
Route::get('v1/exists/{id}', 'StoryController@exists');
|
||||||
|
Route::get('v1/poll/results', 'StoryController@pollResults');
|
||||||
|
Route::post('v1/viewed', 'StoryController@viewed');
|
||||||
|
Route::post('v1/react', 'StoryController@react');
|
||||||
|
Route::post('v1/comment', 'StoryController@comment');
|
||||||
|
Route::post('v1/publish/poll', 'StoryController@publishStoryPoll');
|
||||||
|
Route::post('v1/poll/vote', 'StoryController@storyPollVote');
|
||||||
|
Route::post('v1/report', 'StoryController@storeReport');
|
||||||
|
Route::post('v1/add', 'StoryController@apiV1Add');
|
||||||
|
Route::post('v1/crop', 'StoryController@cropPhoto');
|
||||||
|
Route::post('v1/publish', 'StoryController@publishStory');
|
||||||
|
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'portfolio'], function () {
|
||||||
|
Route::post('self/curated.json', 'PortfolioController@storeCurated');
|
||||||
|
Route::post('self/settings.json', 'PortfolioController@getSettings');
|
||||||
|
Route::get('account/settings.json', 'PortfolioController@getAccountSettings');
|
||||||
|
Route::post('self/update-settings.json', 'PortfolioController@storeSettings');
|
||||||
|
Route::get('{username}/feed', 'PortfolioController@getFeed');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
23
routes/web-portfolio.php
Normal file
23
routes/web-portfolio.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
Route::domain(config('portfolio.domain'))->group(function () {
|
||||||
|
Route::redirect('redirect/home', config('app.url'));
|
||||||
|
Route::get('/', 'PortfolioController@index');
|
||||||
|
Route::post('api/portfolio/self/curated.json', 'PortfolioController@storeCurated');
|
||||||
|
Route::post('api/portfolio/self/settings.json', 'PortfolioController@getSettings');
|
||||||
|
Route::get('api/portfolio/account/settings.json', 'PortfolioController@getAccountSettings');
|
||||||
|
Route::post('api/portfolio/self/update-settings.json', 'PortfolioController@storeSettings');
|
||||||
|
Route::get('api/portfolio/{username}/feed', 'PortfolioController@getFeed');
|
||||||
|
|
||||||
|
Route::prefix(config('portfolio.path'))->group(function() {
|
||||||
|
Route::get('/', 'PortfolioController@index');
|
||||||
|
Route::get('settings', 'PortfolioController@settings')->name('portfolio.settings');
|
||||||
|
Route::post('settings', 'PortfolioController@store');
|
||||||
|
Route::get('{username}/{id}', 'PortfolioController@showPost');
|
||||||
|
Route::get('{username}', 'PortfolioController@show');
|
||||||
|
|
||||||
|
Route::fallback(function () {
|
||||||
|
return view('errors.404');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
351
routes/web.php
351
routes/web.php
|
@ -1,179 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
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');
|
|
||||||
Route::get('stats', 'AdminController@stats')->name('admin.stats');
|
|
||||||
Route::get('reports', 'AdminController@reports')->name('admin.reports');
|
|
||||||
Route::get('reports/show/{id}', 'AdminController@showReport');
|
|
||||||
Route::post('reports/show/{id}', 'AdminController@updateReport');
|
|
||||||
Route::post('reports/bulk', 'AdminController@bulkUpdateReport');
|
|
||||||
Route::get('reports/autospam/{id}', 'AdminController@showSpam');
|
|
||||||
Route::post('reports/autospam/sync', 'AdminController@fixUncategorizedSpam');
|
|
||||||
Route::post('reports/autospam/{id}', 'AdminController@updateSpam');
|
|
||||||
Route::get('reports/autospam', 'AdminController@spam');
|
|
||||||
Route::get('reports/appeals', 'AdminController@appeals');
|
|
||||||
Route::get('reports/appeal/{id}', 'AdminController@showAppeal');
|
|
||||||
Route::post('reports/appeal/{id}', 'AdminController@updateAppeal');
|
|
||||||
Route::get('reports/email-verifications', 'AdminController@reportMailVerifications');
|
|
||||||
Route::post('reports/email-verifications/ignore', 'AdminController@reportMailVerifyIgnore');
|
|
||||||
Route::post('reports/email-verifications/approve', 'AdminController@reportMailVerifyApprove');
|
|
||||||
Route::post('reports/email-verifications/clear-ignored', 'AdminController@reportMailVerifyClearIgnored');
|
|
||||||
Route::redirect('stories', '/stories/list');
|
|
||||||
Route::get('stories/list', 'AdminController@stories')->name('admin.stories');
|
|
||||||
Route::redirect('statuses', '/statuses/list');
|
|
||||||
Route::get('statuses/list', 'AdminController@statuses')->name('admin.statuses');
|
|
||||||
Route::get('statuses/show/{id}', 'AdminController@showStatus');
|
|
||||||
Route::redirect('profiles', '/i/admin/profiles/list');
|
|
||||||
Route::get('profiles/list', 'AdminController@profiles')->name('admin.profiles');
|
|
||||||
Route::get('profiles/edit/{id}', 'AdminController@profileShow');
|
|
||||||
Route::redirect('users', '/users/list');
|
|
||||||
Route::get('users/list', 'AdminController@users')->name('admin.users');
|
|
||||||
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::post('users/modlogs/{id}/delete', 'AdminController@userModLogDelete');
|
|
||||||
Route::get('users/delete/{id}', 'AdminController@userDelete');
|
|
||||||
Route::post('users/delete/{id}', 'AdminController@userDeleteProcess');
|
|
||||||
Route::post('users/moderation/update', 'AdminController@userModerate');
|
|
||||||
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/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');
|
|
||||||
Route::post('settings/pages/delete', 'PageController@delete');
|
|
||||||
Route::post('settings/pages/create', 'PageController@generatePage');
|
|
||||||
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');
|
|
||||||
|
|
||||||
Route::get('messages/home', 'AdminController@messagesHome')->name('admin.messages');
|
|
||||||
Route::get('messages/show/{id}', 'AdminController@messagesShow');
|
|
||||||
Route::post('messages/mark-read', 'AdminController@messagesMarkRead');
|
|
||||||
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');
|
|
||||||
|
|
||||||
Route::get('diagnostics/home', 'AdminController@diagnosticsHome')->name('admin.diagnostics');
|
|
||||||
Route::post('diagnostics/decrypt', 'AdminController@diagnosticsDecrypt')->name('admin.diagnostics.decrypt');
|
|
||||||
Route::get('custom-emoji/home', 'AdminController@customEmojiHome')->name('admin.custom-emoji');
|
|
||||||
Route::post('custom-emoji/toggle-active/{id}', 'AdminController@customEmojiToggleActive');
|
|
||||||
Route::get('custom-emoji/new', 'AdminController@customEmojiAdd');
|
|
||||||
Route::post('custom-emoji/new', 'AdminController@customEmojiStore');
|
|
||||||
Route::post('custom-emoji/delete/{id}', 'AdminController@customEmojiDelete');
|
|
||||||
Route::get('custom-emoji/duplicates/{id}', 'AdminController@customEmojiShowDuplicates');
|
|
||||||
|
|
||||||
Route::get('directory/home', 'AdminController@directoryHome')->name('admin.directory');
|
|
||||||
|
|
||||||
Route::get('autospam/home', 'AdminController@autospamHome')->name('admin.autospam');
|
|
||||||
|
|
||||||
Route::redirect('asf/', 'asf/home');
|
|
||||||
Route::get('asf/home', 'AdminShadowFilterController@home');
|
|
||||||
Route::get('asf/create', 'AdminShadowFilterController@create');
|
|
||||||
Route::get('asf/edit/{id}', 'AdminShadowFilterController@edit');
|
|
||||||
Route::post('asf/edit/{id}', 'AdminShadowFilterController@storeEdit');
|
|
||||||
Route::post('asf/create', 'AdminShadowFilterController@store');
|
|
||||||
|
|
||||||
Route::prefix('api')->group(function() {
|
|
||||||
Route::get('stats', 'AdminController@getStats');
|
|
||||||
Route::get('accounts', 'AdminController@getAccounts');
|
|
||||||
Route::get('posts', 'AdminController@getPosts');
|
|
||||||
Route::get('instances', 'AdminController@getInstances');
|
|
||||||
Route::post('directory/save', 'AdminController@directoryStore');
|
|
||||||
Route::get('directory/initial-data', 'AdminController@directoryInitialData');
|
|
||||||
Route::get('directory/popular-posts', 'AdminController@directoryGetPopularPosts');
|
|
||||||
Route::post('directory/add-by-id', 'AdminController@directoryGetAddPostByIdSearch');
|
|
||||||
Route::delete('directory/banner-image', 'AdminController@directoryDeleteBannerImage');
|
|
||||||
Route::post('directory/submit', 'AdminController@directoryHandleServerSubmission');
|
|
||||||
Route::post('directory/testimonial/save', 'AdminController@directorySaveTestimonial');
|
|
||||||
Route::post('directory/testimonial/delete', 'AdminController@directoryDeleteTestimonial');
|
|
||||||
Route::post('directory/testimonial/update', 'AdminController@directoryUpdateTestimonial');
|
|
||||||
Route::get('hashtags/stats', 'AdminController@hashtagsStats');
|
|
||||||
Route::get('hashtags/query', 'AdminController@hashtagsApi');
|
|
||||||
Route::get('hashtags/get', 'AdminController@hashtagsGet');
|
|
||||||
Route::post('hashtags/update', 'AdminController@hashtagsUpdate');
|
|
||||||
Route::post('hashtags/clear-trending-cache', 'AdminController@hashtagsClearTrendingCache');
|
|
||||||
Route::get('instances/get', 'AdminController@getInstancesApi');
|
|
||||||
Route::get('instances/stats', 'AdminController@getInstancesStatsApi');
|
|
||||||
Route::get('instances/query', 'AdminController@getInstancesQueryApi');
|
|
||||||
Route::post('instances/update', 'AdminController@postInstanceUpdateApi');
|
|
||||||
Route::post('instances/create', 'AdminController@postInstanceCreateNewApi');
|
|
||||||
Route::post('instances/delete', 'AdminController@postInstanceDeleteApi');
|
|
||||||
Route::post('instances/refresh-stats', 'AdminController@postInstanceRefreshStatsApi');
|
|
||||||
Route::get('instances/download-backup', 'AdminController@downloadBackup');
|
|
||||||
Route::post('instances/import-data', 'AdminController@importBackup');
|
|
||||||
Route::get('reports/stats', 'AdminController@reportsStats');
|
|
||||||
Route::get('reports/all', 'AdminController@reportsApiAll');
|
|
||||||
Route::get('reports/get/{id}', 'AdminController@reportsApiGet');
|
|
||||||
Route::post('reports/handle', 'AdminController@reportsApiHandle');
|
|
||||||
Route::get('reports/spam/all', 'AdminController@reportsApiSpamAll');
|
|
||||||
Route::get('reports/spam/get/{id}', 'AdminController@reportsApiSpamGet');
|
|
||||||
Route::post('reports/spam/handle', 'AdminController@reportsApiSpamHandle');
|
|
||||||
Route::post('autospam/config', 'AdminController@getAutospamConfigApi');
|
|
||||||
Route::post('autospam/reports/closed', 'AdminController@getAutospamReportsClosedApi');
|
|
||||||
Route::post('autospam/train', 'AdminController@postAutospamTrainSpamApi');
|
|
||||||
Route::post('autospam/search/non-spam', 'AdminController@postAutospamTrainNonSpamSearchApi');
|
|
||||||
Route::post('autospam/train/non-spam', 'AdminController@postAutospamTrainNonSpamSubmitApi');
|
|
||||||
Route::post('autospam/tokens/custom', 'AdminController@getAutospamCustomTokensApi');
|
|
||||||
Route::post('autospam/tokens/store', 'AdminController@saveNewAutospamCustomTokensApi');
|
|
||||||
Route::post('autospam/tokens/update', 'AdminController@updateAutospamCustomTokensApi');
|
|
||||||
Route::post('autospam/tokens/export', 'AdminController@exportAutospamCustomTokensApi');
|
|
||||||
Route::post('autospam/config/enable', 'AdminController@enableAutospamApi');
|
|
||||||
Route::post('autospam/config/disable', 'AdminController@disableAutospamApi');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::domain(config('portfolio.domain'))->group(function () {
|
|
||||||
Route::redirect('redirect/home', config('app.url'));
|
|
||||||
Route::get('/', 'PortfolioController@index');
|
|
||||||
Route::post('api/portfolio/self/curated.json', 'PortfolioController@storeCurated');
|
|
||||||
Route::post('api/portfolio/self/settings.json', 'PortfolioController@getSettings');
|
|
||||||
Route::get('api/portfolio/account/settings.json', 'PortfolioController@getAccountSettings');
|
|
||||||
Route::post('api/portfolio/self/update-settings.json', 'PortfolioController@storeSettings');
|
|
||||||
Route::get('api/portfolio/{username}/feed', 'PortfolioController@getFeed');
|
|
||||||
|
|
||||||
Route::prefix(config('portfolio.path'))->group(function() {
|
|
||||||
Route::get('/', 'PortfolioController@index');
|
|
||||||
Route::get('settings', 'PortfolioController@settings')->name('portfolio.settings');
|
|
||||||
Route::post('settings', 'PortfolioController@store');
|
|
||||||
Route::get('{username}/{id}', 'PortfolioController@showPost');
|
|
||||||
Route::get('{username}', 'PortfolioController@show');
|
|
||||||
|
|
||||||
Route::fallback(function () {
|
|
||||||
return view('errors.404');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
|
Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
|
||||||
Route::get('/', 'SiteController@home')->name('timeline.personal');
|
Route::get('/', 'SiteController@home')->name('timeline.personal');
|
||||||
Route::redirect('/home', '/')->name('home');
|
Route::redirect('/home', '/')->name('home');
|
||||||
|
@ -203,176 +29,21 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
||||||
Route::get('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegister');
|
Route::get('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegister');
|
||||||
Route::post('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegisterStore');
|
Route::post('auth/pci/{id}/{code}', 'ParentalControlsController@inviteRegisterStore');
|
||||||
|
|
||||||
|
// Route::get('auth/sign_up', 'CuratedRegisterController@index');
|
||||||
|
// Route::post('auth/sign_up', 'CuratedRegisterController@proceed');
|
||||||
|
// Route::get('auth/sign_up/concierge/response-sent', 'CuratedRegisterController@conciergeResponseSent');
|
||||||
|
// Route::get('auth/sign_up/concierge', 'CuratedRegisterController@concierge');
|
||||||
|
// Route::post('auth/sign_up/concierge', 'CuratedRegisterController@conciergeStore');
|
||||||
|
// Route::get('auth/sign_up/concierge/form', 'CuratedRegisterController@conciergeFormShow');
|
||||||
|
// Route::post('auth/sign_up/concierge/form', 'CuratedRegisterController@conciergeFormStore');
|
||||||
|
// Route::get('auth/sign_up/confirm', 'CuratedRegisterController@confirmEmail');
|
||||||
|
// Route::post('auth/sign_up/confirm', 'CuratedRegisterController@confirmEmailHandle');
|
||||||
|
// Route::get('auth/sign_up/confirmed', 'CuratedRegisterController@emailConfirmed');
|
||||||
Route::get('auth/forgot/email', 'UserEmailForgotController@index')->name('email.forgot');
|
Route::get('auth/forgot/email', 'UserEmailForgotController@index')->name('email.forgot');
|
||||||
Route::post('auth/forgot/email', 'UserEmailForgotController@store')->middleware('throttle:10,900,forgotEmail');
|
Route::post('auth/forgot/email', 'UserEmailForgotController@store')->middleware('throttle:10,900,forgotEmail');
|
||||||
|
|
||||||
Route::get('discover', 'DiscoverController@home')->name('discover');
|
Route::get('discover', 'DiscoverController@home')->name('discover');
|
||||||
|
|
||||||
Route::group(['prefix' => 'api'], function () {
|
|
||||||
Route::get('search', 'SearchController@searchAPI');
|
|
||||||
Route::post('status/view', 'StatusController@storeView');
|
|
||||||
Route::get('v1/polls/{id}', 'PollController@getPoll');
|
|
||||||
Route::post('v1/polls/{id}/votes', 'PollController@vote');
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'compose'], function() {
|
|
||||||
Route::group(['prefix' => 'v0'], function() {
|
|
||||||
Route::post('/media/upload', 'ComposeController@mediaUpload');
|
|
||||||
Route::post('/media/update', 'ComposeController@mediaUpdate');
|
|
||||||
Route::delete('/media/delete', 'ComposeController@mediaDelete');
|
|
||||||
Route::get('/search/tag', 'ComposeController@searchTag');
|
|
||||||
Route::get('/search/location', 'ComposeController@searchLocation');
|
|
||||||
Route::get('/search/mention', 'ComposeController@searchMentionAutocomplete');
|
|
||||||
Route::get('/search/hashtag', 'ComposeController@searchHashtagAutocomplete');
|
|
||||||
|
|
||||||
Route::post('/publish', 'ComposeController@store');
|
|
||||||
Route::post('/publish/text', 'ComposeController@storeText');
|
|
||||||
Route::get('/media/processing', 'ComposeController@mediaProcessingCheck');
|
|
||||||
Route::get('/settings', 'ComposeController@composeSettings');
|
|
||||||
Route::post('/poll', 'ComposeController@createPoll');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'direct'], function () {
|
|
||||||
Route::get('browse', 'DirectMessageController@browse');
|
|
||||||
Route::post('create', 'DirectMessageController@create');
|
|
||||||
Route::get('thread', 'DirectMessageController@thread');
|
|
||||||
Route::post('mute', 'DirectMessageController@mute');
|
|
||||||
Route::post('unmute', 'DirectMessageController@unmute');
|
|
||||||
Route::delete('message', 'DirectMessageController@delete');
|
|
||||||
Route::post('media', 'DirectMessageController@mediaUpload');
|
|
||||||
Route::post('lookup', 'DirectMessageController@composeLookup');
|
|
||||||
Route::post('read', 'DirectMessageController@read');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'v2'], function() {
|
|
||||||
Route::get('config', 'ApiController@siteConfiguration');
|
|
||||||
Route::get('discover', 'InternalApiController@discover');
|
|
||||||
Route::get('discover/posts', 'InternalApiController@discoverPosts')->middleware('auth:api');
|
|
||||||
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
|
|
||||||
Route::get('profile/{username}/status/{postid}/state', 'PublicApiController@statusState');
|
|
||||||
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
|
|
||||||
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::get('statuses/{id}/replies', 'Api\ApiV1Controller@statusReplies');
|
|
||||||
Route::get('statuses/{id}/state', 'Api\ApiV1Controller@statusState');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'pixelfed'], function() {
|
|
||||||
Route::group(['prefix' => 'v1'], function() {
|
|
||||||
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
|
|
||||||
Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById');
|
|
||||||
Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch');
|
|
||||||
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
|
|
||||||
Route::post('accounts/{id}/block', 'Api\ApiV1Controller@accountBlockById');
|
|
||||||
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById');
|
|
||||||
Route::get('statuses/{id}', 'PublicApiController@getStatus');
|
|
||||||
Route::get('accounts/{id}', 'PublicApiController@account');
|
|
||||||
Route::post('avatar/update', 'ApiController@avatarUpdate');
|
|
||||||
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
|
|
||||||
Route::get('notifications', 'ApiController@notifications');
|
|
||||||
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
|
||||||
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
|
|
||||||
Route::get('timelines/network', 'PublicApiController@networkTimelineApi');
|
|
||||||
Route::get('newsroom/timeline', 'NewsroomController@timelineApi');
|
|
||||||
Route::post('newsroom/markasread', 'NewsroomController@markAsRead');
|
|
||||||
Route::get('favourites', 'Api\BaseApiController@accountLikes');
|
|
||||||
Route::get('mutes', 'AccountController@accountMutes');
|
|
||||||
Route::get('blocks', 'AccountController@accountBlocks');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'v2'], function() {
|
|
||||||
Route::get('config', 'ApiController@siteConfiguration');
|
|
||||||
Route::get('discover', 'InternalApiController@discover');
|
|
||||||
Route::get('discover/posts', 'InternalApiController@discoverPosts');
|
|
||||||
Route::get('discover/profiles', 'DiscoverController@profilesDirectoryApi');
|
|
||||||
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
|
|
||||||
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
|
|
||||||
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::get('discover/posts/trending', 'DiscoverController@trendingApi');
|
|
||||||
Route::get('discover/posts/hashtags', 'DiscoverController@trendingHashtags');
|
|
||||||
Route::get('discover/posts/places', 'DiscoverController@trendingPlaces');
|
|
||||||
Route::get('seasonal/yir', 'SeasonalController@getData');
|
|
||||||
Route::post('seasonal/yir', 'SeasonalController@store');
|
|
||||||
Route::get('mutes', 'AccountController@accountMutesV2');
|
|
||||||
Route::get('blocks', 'AccountController@accountBlocksV2');
|
|
||||||
Route::get('filters', 'AccountController@accountFiltersV2');
|
|
||||||
Route::post('status/compose', 'InternalApiController@composePost');
|
|
||||||
Route::get('status/{id}/replies', 'InternalApiController@statusReplies');
|
|
||||||
Route::post('status/{id}/archive', 'ApiController@archive');
|
|
||||||
Route::post('status/{id}/unarchive', 'ApiController@unarchive');
|
|
||||||
Route::get('statuses/archives', 'ApiController@archivedPosts');
|
|
||||||
Route::get('discover/memories', 'DiscoverController@myMemories');
|
|
||||||
Route::get('discover/account-insights', 'DiscoverController@accountInsightsPopularPosts');
|
|
||||||
Route::get('discover/server-timeline', 'DiscoverController@serverTimeline');
|
|
||||||
Route::get('discover/meta', 'DiscoverController@enabledFeatures');
|
|
||||||
Route::post('discover/admin/features', 'DiscoverController@updateFeatures');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('discover/accounts/popular', 'Api\ApiV1Controller@discoverAccountsPopular');
|
|
||||||
Route::post('web/change-language.json', 'SpaController@updateLanguage');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'local'], function () {
|
|
||||||
// Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
|
|
||||||
Route::get('exp/rec', 'ApiController@userRecommendations');
|
|
||||||
Route::post('discover/tag/subscribe', 'HashtagFollowController@store');
|
|
||||||
Route::get('discover/tag/list', 'HashtagFollowController@getTags');
|
|
||||||
// Route::get('profile/sponsor/{id}', 'ProfileSponsorController@get');
|
|
||||||
Route::get('bookmarks', 'InternalApiController@bookmarks');
|
|
||||||
Route::get('collection/items/{id}', 'CollectionController@getItems');
|
|
||||||
Route::post('collection/item', 'CollectionController@storeId');
|
|
||||||
Route::delete('collection/item', 'CollectionController@deleteId');
|
|
||||||
Route::get('collection/{id}', 'CollectionController@getCollection');
|
|
||||||
Route::post('collection/{id}', 'CollectionController@store');
|
|
||||||
Route::delete('collection/{id}', 'CollectionController@delete');
|
|
||||||
Route::post('collection/{id}/publish', 'CollectionController@publish');
|
|
||||||
Route::get('profile/collections/{id}', 'CollectionController@getUserCollections');
|
|
||||||
|
|
||||||
Route::post('compose/tag/untagme', 'MediaTagController@untagProfile');
|
|
||||||
|
|
||||||
Route::post('import/ig', 'ImportPostController@store');
|
|
||||||
Route::get('import/ig/config', 'ImportPostController@getConfig');
|
|
||||||
Route::post('import/ig/media', 'ImportPostController@storeMedia');
|
|
||||||
Route::post('import/ig/existing', 'ImportPostController@getImportedFiles');
|
|
||||||
Route::post('import/ig/posts', 'ImportPostController@getImportedPosts');
|
|
||||||
Route::post('import/ig/processing', 'ImportPostController@getProcessingCount');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'web/stories'], function () {
|
|
||||||
Route::get('v1/recent', 'StoryController@recent');
|
|
||||||
Route::get('v1/viewers', 'StoryController@viewers');
|
|
||||||
Route::get('v1/profile/{id}', 'StoryController@profile');
|
|
||||||
Route::get('v1/exists/{id}', 'StoryController@exists');
|
|
||||||
Route::get('v1/poll/results', 'StoryController@pollResults');
|
|
||||||
Route::post('v1/viewed', 'StoryController@viewed');
|
|
||||||
Route::post('v1/react', 'StoryController@react');
|
|
||||||
Route::post('v1/comment', 'StoryController@comment');
|
|
||||||
Route::post('v1/publish/poll', 'StoryController@publishStoryPoll');
|
|
||||||
Route::post('v1/poll/vote', 'StoryController@storyPollVote');
|
|
||||||
Route::post('v1/report', 'StoryController@storeReport');
|
|
||||||
Route::post('v1/add', 'StoryController@apiV1Add');
|
|
||||||
Route::post('v1/crop', 'StoryController@cropPhoto');
|
|
||||||
Route::post('v1/publish', 'StoryController@publishStory');
|
|
||||||
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'portfolio'], function () {
|
|
||||||
Route::post('self/curated.json', 'PortfolioController@storeCurated');
|
|
||||||
Route::post('self/settings.json', 'PortfolioController@getSettings');
|
|
||||||
Route::get('account/settings.json', 'PortfolioController@getAccountSettings');
|
|
||||||
Route::post('self/update-settings.json', 'PortfolioController@storeSettings');
|
|
||||||
Route::get('{username}/feed', 'PortfolioController@getFeed');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('discover/tags/{hashtag}', 'DiscoverController@showTags');
|
Route::get('discover/tags/{hashtag}', 'DiscoverController@showTags');
|
||||||
Route::get('discover/places', 'PlaceController@directoryHome')->name('discover.places');
|
Route::get('discover/places', 'PlaceController@directoryHome')->name('discover.places');
|
||||||
Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
|
Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
|
||||||
|
@ -634,6 +305,8 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
||||||
Route::view('instance-max-users-limit', 'site.help.instance-max-users')->name('help.instance-max-users-limit');
|
Route::view('instance-max-users-limit', 'site.help.instance-max-users')->name('help.instance-max-users-limit');
|
||||||
Route::view('import', 'site.help.import')->name('help.import');
|
Route::view('import', 'site.help.import')->name('help.import');
|
||||||
Route::view('parental-controls', 'site.help.parental-controls');
|
Route::view('parental-controls', 'site.help.parental-controls');
|
||||||
|
// Route::view('email-confirmation-issues', 'site.help.email-confirmation-issues')->name('help.email-confirmation-issues');
|
||||||
|
// Route::view('curated-onboarding', 'site.help.curated-onboarding')->name('help.curated-onboarding');
|
||||||
});
|
});
|
||||||
Route::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show');
|
Route::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show');
|
||||||
Route::get('newsroom/archive', 'NewsroomController@archive');
|
Route::get('newsroom/archive', 'NewsroomController@archive');
|
||||||
|
|
Loading…
Reference in a new issue