Merge branch 'staging' of github.com:pixelfed/pixelfed into jippi-fork

This commit is contained in:
Christian Winther 2024-02-17 00:27:26 +00:00
commit d4198b3262
22 changed files with 969 additions and 678 deletions

View file

@ -1,12 +1,21 @@
# Release Notes # Release Notes
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.11...dev) ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.12...dev)
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.12 (2024-02-16)](https://github.com/pixelfed/pixelfed/compare/v0.11.11...v0.11.12)
### Features
- Autospam Live Filters - block remote activities based on comma separated keywords ([40b45b2a](https://github.com/pixelfed/pixelfed/commit/40b45b2a))
- Added Software Update banner to admin home feeds ([b0fb1988](https://github.com/pixelfed/pixelfed/commit/b0fb1988))
### Updated ### Updated
- Update ApiV1Controller, fix network timeline ([0faf59e3](https://github.com/pixelfed/pixelfed/commit/0faf59e3)) - Update ApiV1Controller, fix network timeline ([0faf59e3](https://github.com/pixelfed/pixelfed/commit/0faf59e3))
- Update public/network timelines, fix non-redis response and fix reblogs in home feed ([8b4ac5cc](https://github.com/pixelfed/pixelfed/commit/8b4ac5cc)) - Update public/network timelines, fix non-redis response and fix reblogs in home feed ([8b4ac5cc](https://github.com/pixelfed/pixelfed/commit/8b4ac5cc))
- ([](https://github.com/pixelfed/pixelfed/commit/)) - Update Federation, use proper Content-Type headers for following/follower collections ([fb0bb9a3](https://github.com/pixelfed/pixelfed/commit/fb0bb9a3))
- Update ActivityPubFetchService, enforce stricter Content-Type validation ([1232cfc8](https://github.com/pixelfed/pixelfed/commit/1232cfc8))
- Update status view, fix unlisted/private scope bug ([0f3ca194](https://github.com/pixelfed/pixelfed/commit/0f3ca194))
## [v0.11.11 (2024-02-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.10...v0.11.11) ## [v0.11.11 (2024-02-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.10...v0.11.11)

View file

@ -253,7 +253,7 @@ class FederationController extends Controller
'type' => 'OrderedCollection', 'type' => 'OrderedCollection',
'totalItems' => $account['following_count'] ?? 0, 'totalItems' => $account['following_count'] ?? 0,
]; ];
return response()->json($obj); return response()->json($obj)->header('Content-Type', 'application/activity+json');
} }
public function userFollowers(Request $request, $username) public function userFollowers(Request $request, $username)
@ -269,6 +269,6 @@ class FederationController extends Controller
'type' => 'OrderedCollection', 'type' => 'OrderedCollection',
'totalItems' => $account['followers_count'] ?? 0, 'totalItems' => $account['followers_count'] ?? 0,
]; ];
return response()->json($obj); return response()->json($obj)->header('Content-Type', 'application/activity+json');
} }
} }

View file

@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Services\Internal\SoftwareUpdateService;
class SoftwareUpdateController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('admin');
}
public function getSoftwareUpdateCheck(Request $request)
{
$res = SoftwareUpdateService::get();
return $res;
}
}

View file

@ -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'));

View file

@ -11,38 +11,61 @@ use Illuminate\Http\Client\RequestException;
class ActivityPubFetchService class ActivityPubFetchService
{ {
public static function get($url, $validateUrl = true) public static function get($url, $validateUrl = true)
{ {
if($validateUrl === true) { if($validateUrl === true) {
if(!Helpers::validateUrl($url)) { if(!Helpers::validateUrl($url)) {
return 0; return 0;
} }
} }
$baseHeaders = [ $baseHeaders = [
'Accept' => 'application/activity+json, application/ld+json', 'Accept' => 'application/activity+json, application/ld+json',
]; ];
$headers = HttpSignature::instanceActorSign($url, false, $baseHeaders, 'get'); $headers = HttpSignature::instanceActorSign($url, false, $baseHeaders, 'get');
$headers['Accept'] = 'application/activity+json, application/ld+json'; $headers['Accept'] = 'application/activity+json, application/ld+json';
$headers['User-Agent'] = 'PixelFedBot/1.0.0 (Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'; $headers['User-Agent'] = 'PixelFedBot/1.0.0 (Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')';
try { try {
$res = Http::withOptions(['allow_redirects' => false])->withHeaders($headers) $res = Http::withOptions(['allow_redirects' => false])
->timeout(30) ->withHeaders($headers)
->connectTimeout(5) ->timeout(30)
->retry(3, 500) ->connectTimeout(5)
->get($url); ->retry(3, 500)
} catch (RequestException $e) { ->get($url);
return; } catch (RequestException $e) {
} catch (ConnectionException $e) { return;
return; } catch (ConnectionException $e) {
} catch (Exception $e) { return;
return; } catch (Exception $e) {
} return;
if(!$res->ok()) { }
return;
} if(!$res->ok()) {
return $res->body(); return;
} }
if(!$res->hasHeader('Content-Type')) {
return;
}
$acceptedTypes = [
'application/activity+json; charset=utf-8',
'application/activity+json',
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
];
$contentType = $res->getHeader('Content-Type')[0];
if(!$contentType) {
return;
}
if(!in_array($contentType, $acceptedTypes)) {
return;
}
return $res->body();
}
} }

View file

@ -0,0 +1,68 @@
<?php
namespace App\Services\Internal;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Http\Client\RequestException;
class SoftwareUpdateService
{
const CACHE_KEY = 'pf:services:software-update:';
public static function get()
{
$curVersion = config('pixelfed.version');
$versions = Cache::remember(self::CACHE_KEY . 'latest:v1.0.0', 1800, function() {
return self::fetchLatest();
});
if(!$versions || !isset($versions['latest'], $versions['latest']['version'])) {
$hideWarning = (bool) config('instance.software-update.disable_failed_warning');
return [
'current' => $curVersion,
'latest' => [
'version' => null,
'published_at' => null,
'url' => null,
],
'running_latest' => $hideWarning ? true : null
];
}
return [
'current' => $curVersion,
'latest' => [
'version' => $versions['latest']['version'],
'published_at' => $versions['latest']['published_at'],
'url' => $versions['latest']['url'],
],
'running_latest' => strval($versions['latest']['version']) === strval($curVersion)
];
}
public static function fetchLatest()
{
try {
$res = Http::withOptions(['allow_redirects' => false])
->timeout(5)
->connectTimeout(5)
->retry(2, 500)
->get('https://versions.pixelfed.org/versions.json');
} catch (RequestException $e) {
return;
} catch (ConnectionException $e) {
return;
} catch (Exception $e) {
return;
}
if(!$res->ok()) {
return;
}
return $res->json();
}
}

View file

@ -315,6 +315,23 @@ class Helpers {
return; return;
} }
if(config('autospam.live_filters.enabled')) {
$filters = config('autospam.live_filters.filters');
if(!empty($filters) && isset($res['content']) && !empty($res['content']) && strlen($filters) > 3) {
$filters = array_map('trim', explode(',', $filters));
$content = $res['content'];
foreach($filters as $filter) {
$filter = trim(strtolower($filter));
if(!$filter || !strlen($filter)) {
continue;
}
if(str_contains(strtolower($content), $filter)) {
return;
}
}
}
}
if(isset($res['object'])) { if(isset($res['object'])) {
$activity = $res; $activity = $res;
} else { } else {
@ -372,6 +389,10 @@ class Helpers {
$idDomain = parse_url($id, PHP_URL_HOST); $idDomain = parse_url($id, PHP_URL_HOST);
$urlDomain = parse_url($url, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST);
if($idDomain && $urlDomain && strtolower($idDomain) !== strtolower($urlDomain)) {
return;
}
if(!self::validateUrl($id)) { if(!self::validateUrl($id)) {
return; return;
} }
@ -455,14 +476,21 @@ class Helpers {
public static function storeStatus($url, $profile, $activity) public static function storeStatus($url, $profile, $activity)
{ {
$originalUrl = $url;
$id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($activity['url']); $id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($activity['url']);
$url = isset($activity['url']) && is_string($activity['url']) ? self::pluckval($activity['url']) : self::pluckval($id); $url = isset($activity['url']) && is_string($activity['url']) ? self::pluckval($activity['url']) : self::pluckval($id);
$idDomain = parse_url($id, PHP_URL_HOST); $idDomain = parse_url($id, PHP_URL_HOST);
$urlDomain = parse_url($url, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST);
$originalUrlDomain = parse_url($originalUrl, PHP_URL_HOST);
if(!self::validateUrl($id) || !self::validateUrl($url)) { if(!self::validateUrl($id) || !self::validateUrl($url)) {
return; return;
} }
if( strtolower($originalUrlDomain) !== strtolower($idDomain) ||
strtolower($originalUrlDomain) !== strtolower($urlDomain) ) {
return;
}
$reply_to = self::getReplyTo($activity); $reply_to = self::getReplyTo($activity);
$ts = self::pluckval($activity['published']); $ts = self::pluckval($activity['published']);
@ -763,7 +791,11 @@ class Helpers {
if(!$res || isset($res['id']) == false) { if(!$res || isset($res['id']) == false) {
return; return;
} }
$urlDomain = parse_url($url, PHP_URL_HOST);
$domain = parse_url($res['id'], PHP_URL_HOST); $domain = parse_url($res['id'], PHP_URL_HOST);
if(strtolower($urlDomain) !== strtolower($domain)) {
return;
}
if(!isset($res['preferredUsername']) && !isset($res['nickname'])) { if(!isset($res['preferredUsername']) && !isset($res['nickname'])) {
return; return;
} }
@ -831,6 +863,9 @@ class Helpers {
public static function sendSignedObject($profile, $url, $body) public static function sendSignedObject($profile, $url, $body)
{ {
if(app()->environment() !== 'production') {
return;
}
ActivityPubDeliveryService::queue() ActivityPubDeliveryService::queue()
->from($profile) ->from($profile)
->to($url) ->to($url)

View file

@ -197,6 +197,22 @@ class Inbox
public function handleCreateActivity() public function handleCreateActivity()
{ {
$activity = $this->payload['object']; $activity = $this->payload['object'];
if(config('autospam.live_filters.enabled')) {
$filters = config('autospam.live_filters.filters');
if(!empty($filters) && isset($activity['content']) && !empty($activity['content']) && strlen($filters) > 3) {
$filters = array_map('trim', explode(',', $filters));
$content = $activity['content'];
foreach($filters as $filter) {
$filter = trim(strtolower($filter));
if(!$filter || !strlen($filter)) {
continue;
}
if(str_contains(strtolower($content), $filter)) {
return;
}
}
}
}
$actor = $this->actorFirstOrCreate($this->payload['actor']); $actor = $this->actorFirstOrCreate($this->payload['actor']);
if(!$actor || $actor->domain == null) { if(!$actor || $actor->domain == null) {
return; return;

View file

@ -33,5 +33,10 @@ return [
'nlp' => [ 'nlp' => [
'enabled' => false, 'enabled' => false,
'spam_sample_limit' => env('PF_AUTOSPAM_NLP_SPAM_SAMPLE_LIMIT', 200), 'spam_sample_limit' => env('PF_AUTOSPAM_NLP_SPAM_SAMPLE_LIMIT', 200),
],
'live_filters' => [
'enabled' => env('PF_AUTOSPAM_LIVE_FILTERS_ENABLED', false),
'filters' => env('PF_AUTOSPAM_LIVE_FILTERS_CSV', ''),
] ]
]; ];

View file

@ -140,5 +140,9 @@ return [
'max_children' => env('INSTANCE_PARENTAL_CONTROLS_MAX_CHILDREN', 1), 'max_children' => env('INSTANCE_PARENTAL_CONTROLS_MAX_CHILDREN', 1),
'auto_verify_email' => true, 'auto_verify_email' => true,
], ],
] ],
'software-update' => [
'disable_failed_warning' => env('INSTANCE_SOFTWARE_UPDATE_DISABLE_FAILED_WARNING', false)
],
]; ];

View file

@ -23,7 +23,7 @@ return [
| This value is the version of your Pixelfed instance. | This value is the version of your Pixelfed instance.
| |
*/ */
'version' => '0.11.11', 'version' => '0.11.12',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

BIN
public/js/home.chunk.88eeebf6c53d4dca.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/manifest.js vendored

Binary file not shown.

Binary file not shown.

View file

@ -9,6 +9,48 @@
</div> </div>
<div class="col-md-8 col-lg-6 px-0"> <div class="col-md-8 col-lg-6 px-0">
<template v-if="showUpdateWarning && updateInfo && updateInfo.hasOwnProperty('running_latest')">
<div class="card rounded-lg mb-4 ft-std" style="background: #e11d48;border: 3px dashed #fff">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center flex-column flex-lg-row" style="gap:1rem">
<div class="d-flex justify-content-between align-items-center" style="gap:1rem">
<i class="d-none d-sm-block far fa-exclamation-triangle fa-5x text-white"></i>
<div>
<h1 class="h3 font-weight-bold text-light mb-0">New Update Available</h1>
<p class="mb-0 text-white" style="font-size:18px;">Update your Pixelfed server as soon as possible!</p>
<p class="mb-n1 text-white small" style="opacity:.7">Once you update, this message will disappear.</p>
<p class="mb-0 text-white small d-flex" style="opacity:.5;gap:1rem;">
<span>Current version: <strong>{{ updateInfo?.current ?? 'Unknown' }}</strong></span>
<span>Latest version: <strong>{{ updateInfo?.latest?.version ?? 'Unknown' }}</strong></span>
</p>
</div>
</div>
<a v-if="updateInfo.latest.url" class="btn btn-light font-weight-bold" :href="updateInfo.latest.url" target="_blank">View Update</a>
</div>
</div>
</div>
</template>
<template v-if="showUpdateConnectionWarning">
<div class="card rounded-lg mb-4 ft-std" style="background: #e11d48;border: 3px dashed #fff">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center flex-column flex-lg-row" style="gap:1rem">
<div class="d-flex justify-content-between align-items-center" style="gap:1rem">
<i class="d-none d-sm-block far fa-exclamation-triangle fa-5x text-white"></i>
<div>
<h1 class="h3 font-weight-bold text-light mb-1">Software Update Check Failed</h1>
<p class="mb-1 text-white" style="font-size:18px;line-height: 1.2;">We attempted to check if there is a new version available, however we encountered an error. <a href="https://github.com/pixelfed/pixelfed/releases" class="text-white font-weight-bold" style="text-decoration: underline;" target="_blank">Click here</a> to view the latest releases.</p>
<p class="mb-0 text-white small">You can set <code class="text-white">INSTANCE_SOFTWARE_UPDATE_DISABLE_FAILED_WARNING=true</code> to remove this warning.</p>
<p class="mb-0 text-white small" style="opacity:.7">Current version: {{ updateInfo?.current ?? 'Unknown' }}</p>
</div>
</div>
</div>
</div>
</div>
</template>
<story-carousel <story-carousel
v-if="storiesEnabled" v-if="storiesEnabled"
:profile="profile" /> :profile="profile" />
@ -59,7 +101,6 @@
"rightbar": Rightbar, "rightbar": Rightbar,
"story-carousel": StoryCarousel, "story-carousel": StoryCarousel,
}, },
data() { data() {
return { return {
isLoaded: false, isLoaded: false,
@ -67,7 +108,10 @@
recommended: [], recommended: [],
trending: [], trending: [],
storiesEnabled: false, storiesEnabled: false,
shouldRefresh: false shouldRefresh: false,
showUpdateWarning: false,
showUpdateConnectionWarning: false,
updateInfo: undefined,
} }
}, },
@ -84,10 +128,33 @@
this.profile = window._sharedData.user; this.profile = window._sharedData.user;
this.isLoaded = true; this.isLoaded = true;
this.storiesEnabled = window.App?.config?.features?.hasOwnProperty('stories') ? window.App.config.features.stories : false; this.storiesEnabled = window.App?.config?.features?.hasOwnProperty('stories') ? window.App.config.features.stories : false;
if(this.profile.is_admin) {
this.softwareUpdateCheck();
}
}, },
updateProfile(delta) { updateProfile(delta) {
this.profile = Object.assign(this.profile, delta); this.profile = Object.assign(this.profile, delta);
},
softwareUpdateCheck() {
axios.get('/api/web-admin/software-update/check')
.then(res => {
if(!res || !res.data || !res.data.hasOwnProperty('running_latest') || res.data.running_latest) {
return;
}
if(res.data.running_latest === null) {
this.updateInfo = res.data;
this.showUpdateConnectionWarning = true;
return;
}
this.updateInfo = res.data;
this.showUpdateWarning = !res.data.running_latest;
})
.catch(err => {
this.showUpdateConnectionWarning = true;
})
} }
} }
} }

View file

@ -4,7 +4,7 @@
]) ])
@php @php
$s = \App\Services\StatusService::get($status->id); $s = \App\Services\StatusService::get($status->id, false);
$displayName = $s && $s['account'] ? $s['account']['display_name'] : false; $displayName = $s && $s['account'] ? $s['account']['display_name'] : false;
$captionPreview = false; $captionPreview = false;
$domain = $displayName ? '@' . parse_url($s['account']['url'], PHP_URL_HOST) : ''; $domain = $displayName ? '@' . parse_url($s['account']['url'], PHP_URL_HOST) : '';

166
routes/web-admin.php Normal file
View 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');
});
});

174
routes/web-api.php Normal file
View file

@ -0,0 +1,174 @@
<?php
use App\Http\Controllers\SoftwareUpdateController;
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' => 'web-admin'], function() {
Route::get('software-update/check', [SoftwareUpdateController::class, 'getSoftwareUpdateCheck']);
});
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
View 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');
});
});
});

View file

@ -1,186 +1,12 @@
<?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');
Route::get('web/directory', 'LandingController@directoryRedirect'); Route::get('web/directory', 'LandingController@directoryRedirect');
Route::get('web/explore', 'LandingController@exploreRedirect'); Route::get('web/explore', 'LandingController@exploreRedirect');
Auth::routes(); Auth::routes();
Route::get('auth/raw/mastodon/start', 'RemoteAuthController@startRedirect'); Route::get('auth/raw/mastodon/start', 'RemoteAuthController@startRedirect');
Route::post('auth/raw/mastodon/config', 'RemoteAuthController@getConfig'); Route::post('auth/raw/mastodon/config', 'RemoteAuthController@getConfig');
Route::post('auth/raw/mastodon/domains', 'RemoteAuthController@getAuthDomains'); Route::post('auth/raw/mastodon/domains', 'RemoteAuthController@getAuthDomains');
@ -203,489 +29,336 @@ 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('discover/tags/{hashtag}', 'DiscoverController@showTags');
Route::get('search', 'SearchController@searchAPI'); Route::get('discover/places', 'PlaceController@directoryHome')->name('discover.places');
Route::post('status/view', 'StatusController@storeView'); Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
Route::get('v1/polls/{id}', 'PollController@getPoll'); Route::get('discover/location/country/{country}', 'PlaceController@directoryCities');
Route::post('v1/polls/{id}/votes', 'PollController@vote');
Route::group(['prefix' => 'compose'], function() { Route::group(['prefix' => 'i'], function () {
Route::group(['prefix' => 'v0'], function() { Route::redirect('/', '/');
Route::post('/media/upload', 'ComposeController@mediaUpload'); Route::get('compose', 'StatusController@compose')->name('compose');
Route::post('/media/update', 'ComposeController@mediaUpdate'); Route::post('comment', 'CommentController@store');
Route::delete('/media/delete', 'ComposeController@mediaDelete'); Route::post('delete', 'StatusController@delete');
Route::get('/search/tag', 'ComposeController@searchTag'); Route::post('mute', 'AccountController@mute');
Route::get('/search/location', 'ComposeController@searchLocation'); Route::post('unmute', 'AccountController@unmute');
Route::get('/search/mention', 'ComposeController@searchMentionAutocomplete'); Route::post('block', 'AccountController@block');
Route::get('/search/hashtag', 'ComposeController@searchHashtagAutocomplete'); Route::post('unblock', 'AccountController@unblock');
Route::post('like', 'LikeController@store');
Route::post('share', 'StatusController@storeShare');
Route::post('follow', 'FollowerController@store');
Route::post('bookmark', 'BookmarkController@store');
Route::get('lang/{locale}', 'SiteController@changeLocale');
Route::get('restored', 'AccountController@accountRestored');
Route::post('/publish', 'ComposeController@store'); Route::get('verify-email', 'AccountController@verifyEmail');
Route::post('/publish/text', 'ComposeController@storeText'); Route::post('verify-email', 'AccountController@sendVerifyEmail');
Route::get('/media/processing', 'ComposeController@mediaProcessingCheck'); Route::get('verify-email/request', 'InternalApiController@requestEmailVerification');
Route::get('/settings', 'ComposeController@composeSettings'); Route::post('verify-email/request', 'InternalApiController@requestEmailVerificationStore');
Route::post('/poll', 'ComposeController@createPoll'); Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail');
});
});
Route::group(['prefix' => 'direct'], function () { Route::get('auth/sudo', 'AccountController@sudoMode');
Route::get('browse', 'DirectMessageController@browse'); Route::post('auth/sudo', 'AccountController@sudoModeVerify');
Route::post('create', 'DirectMessageController@create'); Route::get('auth/checkpoint', 'AccountController@twoFactorCheckpoint');
Route::get('thread', 'DirectMessageController@thread'); Route::post('auth/checkpoint', 'AccountController@twoFactorVerify');
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('results', 'SearchController@results');
Route::get('config', 'ApiController@siteConfiguration'); Route::post('visibility', 'StatusController@toggleVisibility');
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::post('metro/dark-mode', 'SettingsController@metroDarkMode');
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::group(['prefix' => 'report'], function () {
Route::get('config', 'ApiController@siteConfiguration'); Route::get('/', 'ReportController@showForm')->name('report.form');
Route::get('discover', 'InternalApiController@discover'); Route::post('/', 'ReportController@formStore');
Route::get('discover/posts', 'InternalApiController@discoverPosts'); Route::get('not-interested', 'ReportController@notInterestedForm')->name('report.not-interested');
Route::get('discover/profiles', 'DiscoverController@profilesDirectoryApi'); Route::get('spam', 'ReportController@spamForm')->name('report.spam');
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status'); Route::get('spam/comment', 'ReportController@spamCommentForm')->name('report.spam.comment');
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments'); Route::get('spam/post', 'ReportController@spamPostForm')->name('report.spam.post');
Route::post('moderator/action', 'InternalApiController@modAction'); Route::get('spam/profile', 'ReportController@spamProfileForm')->name('report.spam.profile');
Route::get('discover/categories', 'InternalApiController@discoverCategories'); Route::get('sensitive/comment', 'ReportController@sensitiveCommentForm')->name('report.sensitive.comment');
Route::get('loops', 'DiscoverController@loopsApi'); Route::get('sensitive/post', 'ReportController@sensitivePostForm')->name('report.sensitive.post');
Route::post('loops/watch', 'DiscoverController@loopWatch'); Route::get('sensitive/profile', 'ReportController@sensitiveProfileForm')->name('report.sensitive.profile');
Route::get('discover/tag', 'DiscoverController@getHashtags'); Route::get('abusive/comment', 'ReportController@abusiveCommentForm')->name('report.abusive.comment');
Route::get('discover/posts/trending', 'DiscoverController@trendingApi'); Route::get('abusive/post', 'ReportController@abusivePostForm')->name('report.abusive.post');
Route::get('discover/posts/hashtags', 'DiscoverController@trendingHashtags'); Route::get('abusive/profile', 'ReportController@abusiveProfileForm')->name('report.abusive.profile');
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::get('collections/create', 'CollectionController@create');
Route::post('web/change-language.json', 'SpaController@updateLanguage');
});
Route::group(['prefix' => 'local'], function () { Route::get('me', 'ProfileController@meRedirect');
// Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440'); Route::get('intent/follow', 'SiteController@followIntent');
Route::get('exp/rec', 'ApiController@userRecommendations'); Route::get('rs/{id}', 'StoryController@remoteStory');
Route::post('discover/tag/subscribe', 'HashtagFollowController@store'); Route::get('stories/new', 'StoryController@compose');
Route::get('discover/tag/list', 'HashtagFollowController@getTags'); Route::get('my/story', 'StoryController@iRedirect');
// Route::get('profile/sponsor/{id}', 'ProfileSponsorController@get'); Route::get('web/profile/_/{id}', 'InternalApiController@remoteProfile');
Route::get('bookmarks', 'InternalApiController@bookmarks'); Route::get('web/post/_/{profileId}/{statusid}', 'InternalApiController@remoteStatus');
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/places', 'PlaceController@directoryHome')->name('discover.places');
Route::get('discover/places/{id}/{slug}', 'PlaceController@show');
Route::get('discover/location/country/{country}', 'PlaceController@directoryCities');
Route::group(['prefix' => 'i'], function () {
Route::redirect('/', '/');
Route::get('compose', 'StatusController@compose')->name('compose');
Route::post('comment', 'CommentController@store');
Route::post('delete', 'StatusController@delete');
Route::post('mute', 'AccountController@mute');
Route::post('unmute', 'AccountController@unmute');
Route::post('block', 'AccountController@block');
Route::post('unblock', 'AccountController@unblock');
Route::post('like', 'LikeController@store');
Route::post('share', 'StatusController@storeShare');
Route::post('follow', 'FollowerController@store');
Route::post('bookmark', 'BookmarkController@store');
Route::get('lang/{locale}', 'SiteController@changeLocale');
Route::get('restored', 'AccountController@accountRestored');
Route::get('verify-email', 'AccountController@verifyEmail');
Route::post('verify-email', 'AccountController@sendVerifyEmail');
Route::get('verify-email/request', 'InternalApiController@requestEmailVerification');
Route::post('verify-email/request', 'InternalApiController@requestEmailVerificationStore');
Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail');
Route::get('auth/sudo', 'AccountController@sudoMode');
Route::post('auth/sudo', 'AccountController@sudoModeVerify');
Route::get('auth/checkpoint', 'AccountController@twoFactorCheckpoint');
Route::post('auth/checkpoint', 'AccountController@twoFactorVerify');
Route::get('results', 'SearchController@results');
Route::post('visibility', 'StatusController@toggleVisibility');
Route::post('metro/dark-mode', 'SettingsController@metroDarkMode');
Route::group(['prefix' => 'report'], function () {
Route::get('/', 'ReportController@showForm')->name('report.form');
Route::post('/', 'ReportController@formStore');
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');
});
Route::get('collections/create', 'CollectionController@create');
Route::get('me', 'ProfileController@meRedirect');
Route::get('intent/follow', 'SiteController@followIntent');
Route::get('rs/{id}', 'StoryController@remoteStory');
Route::get('stories/new', 'StoryController@compose');
Route::get('my/story', 'StoryController@iRedirect');
Route::get('web/profile/_/{id}', 'InternalApiController@remoteProfile');
Route::get('web/post/_/{profileId}/{statusid}', 'InternalApiController@remoteStatus');
Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() {
Route::get('job/{uuid}/1', 'ImportController@instagramStepOne');
Route::post('job/{uuid}/1', 'ImportController@instagramStepOneStore');
Route::get('job/{uuid}/2', 'ImportController@instagramStepTwo');
Route::post('job/{uuid}/2', 'ImportController@instagramStepTwoStore');
Route::get('job/{uuid}/3', 'ImportController@instagramStepThree');
Route::post('job/{uuid}/3', 'ImportController@instagramStepThreeStore');
});
Route::get('redirect', 'SiteController@redirectUrl');
Route::post('admin/media/block/add', 'MediaBlocklistController@add');
Route::post('admin/media/block/delete', 'MediaBlocklistController@delete');
Route::get('warning', 'AccountInterstitialController@get');
Route::post('warning', 'AccountInterstitialController@read');
Route::get('my2020', 'SeasonalController@yearInReview');
Route::get('web/my-portfolio', 'PortfolioController@myRedirect');
Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
Route::get('web/username/{id}', 'SpaController@usernameRedirect');
Route::get('web/post/{id}', 'SpaController@webPost');
Route::get('web/profile/{id}', 'SpaController@webProfile');
Route::get('web/{q}', 'SpaController@index')->where('q', '.*');
Route::get('web', 'SpaController@index');
});
Route::group(['prefix' => 'account'], function () {
Route::redirect('/', '/');
Route::get('direct', 'AccountController@direct');
Route::get('direct/t/{id}', 'AccountController@directMessage');
Route::get('activity', 'AccountController@notifications')->name('notifications');
Route::get('follow-requests', 'AccountController@followRequests')->name('follow-requests');
Route::post('follow-requests', 'AccountController@followRequestHandle');
Route::get('follow-requests.json', 'AccountController@followRequestsJson');
Route::get('portfolio/{username}.json', 'PortfolioController@getApFeed');
Route::get('portfolio/{username}.rss', 'PortfolioController@getRssFeed');
});
Route::group(['prefix' => 'settings'], function () {
Route::redirect('/', '/settings/home');
Route::get('home', 'SettingsController@home')
->name('settings');
Route::post('home', 'SettingsController@homeUpdate');
Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar');
Route::post('avatar', 'AvatarController@store');
Route::delete('avatar', 'AvatarController@deleteAvatar');
Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone');
Route::post('password', 'SettingsController@passwordUpdate')->middleware('dangerzone');
Route::get('email', 'SettingsController@email')->name('settings.email')->middleware('dangerzone');
Route::post('email', 'SettingsController@emailUpdate')->middleware('dangerzone');
Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications');
Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy');
Route::post('privacy', 'SettingsController@privacyStore');
Route::get('privacy/muted-users', 'SettingsController@mutedUsers')->name('settings.privacy.muted-users');
Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate');
Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users');
Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate');
Route::get('privacy/domain-blocks', 'SettingsController@domainBlocks')->name('settings.privacy.domain-blocks');
Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances');
Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore');
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');
Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account');
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');
});
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');
Route::post(
'2fa/recovery-codes',
'SettingsController@securityTwoFactorRecoveryCodesRegenerate'
);
});
Route::get('parental-controls', 'ParentalControlsController@index')->name('settings.parental-controls')->middleware('dangerzone');
Route::get('parental-controls/add', 'ParentalControlsController@add')->name('settings.pc.add')->middleware('dangerzone');
Route::post('parental-controls/add', 'ParentalControlsController@store')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}', 'ParentalControlsController@view')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}', 'ParentalControlsController@update')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInvite')->name('settings.pc.cancel-invite')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInviteHandle')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManaging')->name('settings.pc.stop-managing')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManagingHandle')->middleware('dangerzone');
Route::get('applications', 'SettingsController@applications')->name('settings.applications')->middleware('dangerzone');
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');
Route::post('data-export/account', 'SettingsController@exportAccount')->middleware('dangerzone');
Route::post('data-export/statuses', 'SettingsController@exportStatuses')->middleware('dangerzone');
Route::get('developers', 'SettingsController@developers')->name('settings.developers')->middleware('dangerzone');
Route::get('labs', 'SettingsController@labs')->name('settings.labs');
Route::post('labs', 'SettingsController@labsStore');
Route::get('accessibility', 'SettingsController@accessibility')->name('settings.accessibility');
Route::post('accessibility', 'SettingsController@accessibilityStore');
Route::group(['prefix' => 'relationships'], function() {
Route::redirect('/', '/settings/relationships/home');
Route::get('home', 'SettingsController@relationshipsHome')->name('settings.relationships');
});
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');
Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() { Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() {
Route::get('/', 'SettingsController@dataImport')->name('settings.import'); Route::get('job/{uuid}/1', 'ImportController@instagramStepOne');
Route::prefix('instagram')->group(function() { Route::post('job/{uuid}/1', 'ImportController@instagramStepOneStore');
Route::get('/', 'ImportController@instagram')->name('settings.import.ig'); Route::get('job/{uuid}/2', 'ImportController@instagramStepTwo');
Route::post('/', 'ImportController@instagramStart'); Route::post('job/{uuid}/2', 'ImportController@instagramStepTwoStore');
}); Route::get('job/{uuid}/3', 'ImportController@instagramStepThree');
Route::prefix('mastodon')->group(function() { Route::post('job/{uuid}/3', 'ImportController@instagramStepThreeStore');
Route::get('/', 'ImportController@mastodon')->name('settings.import.mastodon'); });
});
});
Route::get('timeline', 'SettingsController@timelineSettings')->name('settings.timeline'); Route::get('redirect', 'SiteController@redirectUrl');
Route::post('timeline', 'SettingsController@updateTimelineSettings'); Route::post('admin/media/block/add', 'MediaBlocklistController@add');
Route::get('media', 'SettingsController@mediaSettings')->name('settings.media'); Route::post('admin/media/block/delete', 'MediaBlocklistController@delete');
Route::post('media', 'SettingsController@updateMediaSettings');
Route::get('warning', 'AccountInterstitialController@get');
Route::post('warning', 'AccountInterstitialController@read');
Route::get('my2020', 'SeasonalController@yearInReview');
Route::get('web/my-portfolio', 'PortfolioController@myRedirect');
Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
Route::get('web/username/{id}', 'SpaController@usernameRedirect');
Route::get('web/post/{id}', 'SpaController@webPost');
Route::get('web/profile/{id}', 'SpaController@webProfile');
Route::get('web/{q}', 'SpaController@index')->where('q', '.*');
Route::get('web', 'SpaController@index');
});
Route::group(['prefix' => 'account'], function () {
Route::redirect('/', '/');
Route::get('direct', 'AccountController@direct');
Route::get('direct/t/{id}', 'AccountController@directMessage');
Route::get('activity', 'AccountController@notifications')->name('notifications');
Route::get('follow-requests', 'AccountController@followRequests')->name('follow-requests');
Route::post('follow-requests', 'AccountController@followRequestHandle');
Route::get('follow-requests.json', 'AccountController@followRequestsJson');
Route::get('portfolio/{username}.json', 'PortfolioController@getApFeed');
Route::get('portfolio/{username}.rss', 'PortfolioController@getRssFeed');
});
Route::group(['prefix' => 'settings'], function () {
Route::redirect('/', '/settings/home');
Route::get('home', 'SettingsController@home')
->name('settings');
Route::post('home', 'SettingsController@homeUpdate');
Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar');
Route::post('avatar', 'AvatarController@store');
Route::delete('avatar', 'AvatarController@deleteAvatar');
Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone');
Route::post('password', 'SettingsController@passwordUpdate')->middleware('dangerzone');
Route::get('email', 'SettingsController@email')->name('settings.email')->middleware('dangerzone');
Route::post('email', 'SettingsController@emailUpdate')->middleware('dangerzone');
Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications');
Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy');
Route::post('privacy', 'SettingsController@privacyStore');
Route::get('privacy/muted-users', 'SettingsController@mutedUsers')->name('settings.privacy.muted-users');
Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate');
Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users');
Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate');
Route::get('privacy/domain-blocks', 'SettingsController@domainBlocks')->name('settings.privacy.domain-blocks');
Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances');
Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore');
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');
Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account');
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');
});
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');
Route::post(
'2fa/recovery-codes',
'SettingsController@securityTwoFactorRecoveryCodesRegenerate'
);
});
Route::get('parental-controls', 'ParentalControlsController@index')->name('settings.parental-controls')->middleware('dangerzone');
Route::get('parental-controls/add', 'ParentalControlsController@add')->name('settings.pc.add')->middleware('dangerzone');
Route::post('parental-controls/add', 'ParentalControlsController@store')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}', 'ParentalControlsController@view')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}', 'ParentalControlsController@update')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInvite')->name('settings.pc.cancel-invite')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}/cancel-invite', 'ParentalControlsController@cancelInviteHandle')->middleware('dangerzone');
Route::get('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManaging')->name('settings.pc.stop-managing')->middleware('dangerzone');
Route::post('parental-controls/manage/{id}/stop-managing', 'ParentalControlsController@stopManagingHandle')->middleware('dangerzone');
Route::get('applications', 'SettingsController@applications')->name('settings.applications')->middleware('dangerzone');
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');
Route::post('data-export/account', 'SettingsController@exportAccount')->middleware('dangerzone');
Route::post('data-export/statuses', 'SettingsController@exportStatuses')->middleware('dangerzone');
Route::get('developers', 'SettingsController@developers')->name('settings.developers')->middleware('dangerzone');
Route::get('labs', 'SettingsController@labs')->name('settings.labs');
Route::post('labs', 'SettingsController@labsStore');
Route::get('accessibility', 'SettingsController@accessibility')->name('settings.accessibility');
Route::post('accessibility', 'SettingsController@accessibilityStore');
Route::group(['prefix' => 'relationships'], function() {
Route::redirect('/', '/settings/relationships/home');
Route::get('home', 'SettingsController@relationshipsHome')->name('settings.relationships');
});
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');
Route::group(['prefix' => 'import', 'middleware' => 'dangerzone'], function() {
Route::get('/', 'SettingsController@dataImport')->name('settings.import');
Route::prefix('instagram')->group(function() {
Route::get('/', 'ImportController@instagram')->name('settings.import.ig');
Route::post('/', 'ImportController@instagramStart');
});
Route::prefix('mastodon')->group(function() {
Route::get('/', 'ImportController@mastodon')->name('settings.import.mastodon');
});
});
Route::get('timeline', 'SettingsController@timelineSettings')->name('settings.timeline');
Route::post('timeline', 'SettingsController@updateTimelineSettings');
Route::get('media', 'SettingsController@mediaSettings')->name('settings.media');
Route::post('media', 'SettingsController@updateMediaSettings');
Route::group(['prefix' => 'account/aliases', 'middleware' => 'dangerzone'], function() { Route::group(['prefix' => 'account/aliases', 'middleware' => 'dangerzone'], function() {
Route::get('manage', 'ProfileAliasController@index'); Route::get('manage', 'ProfileAliasController@index');
Route::post('manage', 'ProfileAliasController@store'); Route::post('manage', 'ProfileAliasController@store');
Route::post('manage/delete', 'ProfileAliasController@delete'); Route::post('manage/delete', 'ProfileAliasController@delete');
}); });
}); });
Route::group(['prefix' => 'site'], function () { Route::group(['prefix' => 'site'], function () {
Route::redirect('/', '/'); Route::redirect('/', '/');
Route::get('about', 'SiteController@about')->name('site.about'); Route::get('about', 'SiteController@about')->name('site.about');
Route::view('help', 'site.help')->name('site.help'); Route::view('help', 'site.help')->name('site.help');
Route::view('developer-api', 'site.developer')->name('site.developers'); Route::view('developer-api', 'site.developer')->name('site.developers');
Route::view('fediverse', 'site.fediverse')->name('site.fediverse'); Route::view('fediverse', 'site.fediverse')->name('site.fediverse');
Route::view('open-source', 'site.opensource')->name('site.opensource'); Route::view('open-source', 'site.opensource')->name('site.opensource');
Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances'); Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
Route::get('terms', 'SiteController@terms')->name('site.terms'); Route::get('terms', 'SiteController@terms')->name('site.terms');
Route::get('privacy', 'SiteController@privacy')->name('site.privacy'); Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
Route::view('platform', 'site.platform')->name('site.platform'); Route::view('platform', 'site.platform')->name('site.platform');
Route::view('language', 'site.language')->name('site.language'); Route::view('language', 'site.language')->name('site.language');
Route::get('contact', 'ContactController@show')->name('site.contact'); Route::get('contact', 'ContactController@show')->name('site.contact');
Route::post('contact', 'ContactController@store'); Route::post('contact', 'ContactController@store');
Route::group(['prefix'=>'kb'], function() { Route::group(['prefix'=>'kb'], function() {
Route::view('getting-started', 'site.help.getting-started')->name('help.getting-started'); 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('sharing-media', 'site.help.sharing-media')->name('help.sharing-media');
Route::view('your-profile', 'site.help.your-profile')->name('help.your-profile'); Route::view('your-profile', 'site.help.your-profile')->name('help.your-profile');
Route::view('stories', 'site.help.stories')->name('help.stories'); Route::view('stories', 'site.help.stories')->name('help.stories');
Route::view('embed', 'site.help.embed')->name('help.embed'); Route::view('embed', 'site.help.embed')->name('help.embed');
Route::view('hashtags', 'site.help.hashtags')->name('help.hashtags'); Route::view('hashtags', 'site.help.hashtags')->name('help.hashtags');
Route::view('instance-actor', 'site.help.instance-actor')->name('help.instance-actor'); Route::view('instance-actor', 'site.help.instance-actor')->name('help.instance-actor');
Route::view('discover', 'site.help.discover')->name('help.discover'); Route::view('discover', 'site.help.discover')->name('help.discover');
Route::view('direct-messages', 'site.help.dm')->name('help.dm'); Route::view('direct-messages', 'site.help.dm')->name('help.dm');
Route::view('timelines', 'site.help.timelines')->name('help.timelines'); 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('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'); Route::view('safety-tips', 'site.help.safety-tips')->name('help.safety-tips');
Route::get('community-guidelines', 'SiteController@communityGuidelines')->name('help.community-guidelines'); Route::get('community-guidelines', 'SiteController@communityGuidelines')->name('help.community-guidelines');
Route::view('controlling-visibility', 'site.help.controlling-visibility')->name('help.controlling-visibility'); 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('blocking-accounts', 'site.help.blocking-accounts')->name('help.blocking-accounts');
Route::view('report-something', 'site.help.report-something')->name('help.report-something'); Route::view('report-something', 'site.help.report-something')->name('help.report-something');
Route::view('data-policy', 'site.help.data-policy')->name('help.data-policy'); Route::view('data-policy', 'site.help.data-policy')->name('help.data-policy');
Route::view('labs-deprecation', 'site.help.labs-deprecation')->name('help.labs-deprecation'); Route::view('labs-deprecation', 'site.help.labs-deprecation')->name('help.labs-deprecation');
Route::view('tagging-people', 'site.help.tagging-people')->name('help.tagging-people'); Route::view('tagging-people', 'site.help.tagging-people')->name('help.tagging-people');
Route::view('licenses', 'site.help.licenses')->name('help.licenses'); Route::view('licenses', 'site.help.licenses')->name('help.licenses');
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::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show'); // Route::view('curated-onboarding', 'site.help.curated-onboarding')->name('help.curated-onboarding');
Route::get('newsroom/archive', 'NewsroomController@archive'); });
Route::get('newsroom/search', 'NewsroomController@search'); Route::get('newsroom/{year}/{month}/{slug}', 'NewsroomController@show');
Route::get('newsroom', 'NewsroomController@index'); Route::get('newsroom/archive', 'NewsroomController@archive');
Route::get('legal-notice', 'SiteController@legalNotice'); Route::get('newsroom/search', 'NewsroomController@search');
}); Route::get('newsroom', 'NewsroomController@index');
Route::get('legal-notice', 'SiteController@legalNotice');
});
Route::group(['prefix' => 'timeline'], function () { Route::group(['prefix' => 'timeline'], function () {
Route::redirect('/', '/'); Route::redirect('/', '/');
Route::get('public', 'TimelineController@local')->name('timeline.public'); Route::get('public', 'TimelineController@local')->name('timeline.public');
Route::get('network', 'TimelineController@network')->name('timeline.network'); Route::get('network', 'TimelineController@network')->name('timeline.network');
}); });
Route::group(['prefix' => 'users'], function () { Route::group(['prefix' => 'users'], function () {
Route::redirect('/', '/'); Route::redirect('/', '/');
Route::get('{user}.atom', 'ProfileController@showAtomFeed')->where('user', '.*'); Route::get('{user}.atom', 'ProfileController@showAtomFeed')->where('user', '.*');
Route::get('{username}/outbox', 'FederationController@userOutbox'); Route::get('{username}/outbox', 'FederationController@userOutbox');
Route::get('{username}/followers', 'FederationController@userFollowers'); Route::get('{username}/followers', 'FederationController@userFollowers');
Route::get('{username}/following', 'FederationController@userFollowing'); Route::get('{username}/following', 'FederationController@userFollowing');
Route::get('{username}', 'ProfileController@permalinkRedirect'); Route::get('{username}', 'ProfileController@permalinkRedirect');
}); });
Route::group(['prefix' => 'installer'], function() { Route::group(['prefix' => 'installer'], function() {
Route::get('api/requirements', 'InstallController@getRequirements')->withoutMiddleware(['web']); Route::get('api/requirements', 'InstallController@getRequirements')->withoutMiddleware(['web']);
Route::post('precheck/database', 'InstallController@precheckDatabase')->withoutMiddleware(['web']); Route::post('precheck/database', 'InstallController@precheckDatabase')->withoutMiddleware(['web']);
Route::post('store', 'InstallController@store')->withoutMiddleware(['web']); Route::post('store', 'InstallController@store')->withoutMiddleware(['web']);
Route::get('/', 'InstallController@index')->withoutMiddleware(['web']); Route::get('/', 'InstallController@index')->withoutMiddleware(['web']);
Route::get('/{q}', 'InstallController@index')->withoutMiddleware(['web'])->where('q', '.*'); Route::get('/{q}', 'InstallController@index')->withoutMiddleware(['web'])->where('q', '.*');
}); });
Route::group(['prefix' => 'e'], function() { Route::group(['prefix' => 'e'], function() {
Route::get('terms', 'MobileController@terms'); Route::get('terms', 'MobileController@terms');
Route::get('privacy', 'MobileController@privacy'); Route::get('privacy', 'MobileController@privacy');
}); });
Route::get('auth/invite/a/{code}', 'AdminInviteController@index'); Route::get('auth/invite/a/{code}', 'AdminInviteController@index');
Route::post('api/v1.1/auth/invite/admin/re', 'AdminInviteController@apiRegister')->middleware('throttle:5,1440'); Route::post('api/v1.1/auth/invite/admin/re', 'AdminInviteController@apiRegister')->middleware('throttle:5,1440');
Route::get('storage/m/_v2/{pid}/{mhash}/{uhash}/{f}', 'MediaController@fallbackRedirect'); Route::get('storage/m/_v2/{pid}/{mhash}/{uhash}/{f}', 'MediaController@fallbackRedirect');
Route::get('stories/{username}', 'ProfileController@stories'); Route::get('stories/{username}', 'ProfileController@stories');
Route::get('p/{id}', 'StatusController@shortcodeRedirect'); Route::get('p/{id}', 'StatusController@shortcodeRedirect');
Route::get('c/{collection}', 'CollectionController@show'); Route::get('c/{collection}', 'CollectionController@show');
Route::get('p/{username}/{id}/c', 'CommentController@showAll'); Route::get('p/{username}/{id}/c', 'CommentController@showAll');
Route::get('p/{username}/{id}/embed', 'StatusController@showEmbed'); Route::get('p/{username}/{id}/embed', 'StatusController@showEmbed');
Route::get('p/{username}/{id}/edit', 'StatusController@edit'); Route::get('p/{username}/{id}/edit', 'StatusController@edit');
Route::post('p/{username}/{id}/edit', 'StatusController@editStore'); Route::post('p/{username}/{id}/edit', 'StatusController@editStore');
Route::get('p/{username}/{id}.json', 'StatusController@showObject'); Route::get('p/{username}/{id}.json', 'StatusController@showObject');
Route::get('p/{username}/{id}', 'StatusController@show'); Route::get('p/{username}/{id}', 'StatusController@show');
Route::get('{username}/embed', 'ProfileController@embed'); Route::get('{username}/embed', 'ProfileController@embed');
Route::get('{username}/live', 'LiveStreamController@showProfilePlayer'); Route::get('{username}/live', 'LiveStreamController@showProfilePlayer');
Route::get('@{username}@{domain}', 'SiteController@legacyWebfingerRedirect'); Route::get('@{username}@{domain}', 'SiteController@legacyWebfingerRedirect');
Route::get('@{username}', 'SiteController@legacyProfileRedirect'); Route::get('@{username}', 'SiteController@legacyProfileRedirect');
Route::get('{username}', 'ProfileController@show'); Route::get('{username}', 'ProfileController@show');
}); });