login update
This commit is contained in:
@@ -570,3 +570,21 @@ Route::middleware(['web', 'auth'])
|
||||
|
||||
// ── Artwork search for share modal (public, throttled) ────────────────────────
|
||||
// GET /api/search/artworks?q=...&shareable=1 → reuses existing ArtworkSearchController
|
||||
|
||||
// ── Stories API (public, throttled) ──────────────────────────────────────────
|
||||
Route::middleware(['throttle:60,1'])
|
||||
->prefix('stories')
|
||||
->name('api.stories.')
|
||||
->group(function () {
|
||||
Route::get('/', [\App\Http\Controllers\Api\StoriesApiController::class, 'index'])->name('index');
|
||||
Route::get('/featured', [\App\Http\Controllers\Api\StoriesApiController::class, 'featured'])->name('featured');
|
||||
Route::get('/tag/{tag}', [\App\Http\Controllers\Api\StoriesApiController::class, 'byTag'])
|
||||
->where('tag', '[a-z0-9\-]+')
|
||||
->name('tag');
|
||||
Route::get('/author/{username}',[\App\Http\Controllers\Api\StoriesApiController::class, 'byAuthor'])
|
||||
->where('username', '[A-Za-z0-9_\-]{1,50}')
|
||||
->name('author');
|
||||
Route::get('/{slug}', [\App\Http\Controllers\Api\StoriesApiController::class, 'show'])
|
||||
->where('slug', '[a-z0-9\-]+')
|
||||
->name('show');
|
||||
});
|
||||
|
||||
@@ -11,9 +11,22 @@ use App\Http\Controllers\Auth\RegisteredUserController;
|
||||
use App\Http\Controllers\Auth\RegistrationVerificationController;
|
||||
use App\Http\Controllers\Auth\SetupPasswordController;
|
||||
use App\Http\Controllers\Auth\SetupUsernameController;
|
||||
use App\Http\Controllers\Auth\OAuthController;
|
||||
use App\Http\Controllers\Auth\VerifyEmailController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// ── OAuth / Social Login ─────────────────────────────────────────────────────
|
||||
Route::middleware('guest')->group(function (): void {
|
||||
Route::get('auth/{provider}/redirect', [OAuthController::class, 'redirectToProvider'])
|
||||
->where('provider', 'google|discord')
|
||||
->name('oauth.redirect');
|
||||
|
||||
// Google and Discord use GET callbacks; Apple sends a POST on first login.
|
||||
Route::match(['get', 'post'], 'auth/{provider}/callback', [OAuthController::class, 'handleProviderCallback'])
|
||||
->where('provider', 'google|discord')
|
||||
->name('oauth.callback');
|
||||
});
|
||||
|
||||
Route::middleware(['guest', 'normalize.username'])->group(function () {
|
||||
Route::get('register', [RegisteredUserController::class, 'create'])
|
||||
->name('register');
|
||||
|
||||
@@ -36,10 +36,20 @@ use App\Http\Controllers\Web\DiscoverController;
|
||||
use App\Http\Controllers\Web\ExploreController;
|
||||
use App\Http\Controllers\Web\BlogController;
|
||||
use App\Http\Controllers\Web\PageController;
|
||||
use App\Http\Controllers\Web\StoriesController;
|
||||
use App\Http\Controllers\Web\StoryController;
|
||||
use App\Http\Controllers\Web\StoriesTagController;
|
||||
use App\Http\Controllers\Web\StoriesAuthorController;
|
||||
use App\Http\Controllers\Web\FooterController;
|
||||
use App\Http\Controllers\Web\StaffController;
|
||||
use App\Http\Controllers\Web\RssFeedController;
|
||||
use App\Http\Controllers\Web\ApplicationController;
|
||||
use App\Http\Controllers\RSS\GlobalFeedController;
|
||||
use App\Http\Controllers\RSS\DiscoverFeedController;
|
||||
use App\Http\Controllers\RSS\ExploreFeedController;
|
||||
use App\Http\Controllers\RSS\TagFeedController;
|
||||
use App\Http\Controllers\RSS\CreatorFeedController;
|
||||
use App\Http\Controllers\RSS\BlogFeedController;
|
||||
use App\Http\Controllers\Web\StaffApplicationAdminController;
|
||||
use Inertia\Inertia;
|
||||
|
||||
@@ -117,12 +127,50 @@ Route::middleware(['auth'])->prefix('admin')->name('admin.')->group(function ()
|
||||
Route::get('/applications/{staffApplication}', [StaffApplicationAdminController::class, 'show'])->name('applications.show');
|
||||
});
|
||||
|
||||
// RSS XML feeds
|
||||
// RSS XML feeds (legacy .xml routes — kept for backward compatibility)
|
||||
Route::get('/rss/latest-uploads.xml', [RssFeedController::class, 'latestUploads'])->name('rss.uploads');
|
||||
Route::get('/rss/latest-skins.xml', [RssFeedController::class, 'latestSkins'])->name('rss.skins');
|
||||
Route::get('/rss/latest-wallpapers.xml', [RssFeedController::class, 'latestWallpapers'])->name('rss.wallpapers');
|
||||
Route::get('/rss/latest-photos.xml', [RssFeedController::class, 'latestPhotos'])->name('rss.photos');
|
||||
|
||||
// ── RSS 2.0 Nova feeds (/rss/*) ───────────────────────────────────────────────
|
||||
Route::middleware('throttle:60,1')->group(function () {
|
||||
// Global feed
|
||||
Route::get('/rss', GlobalFeedController::class)->name('rss.global');
|
||||
|
||||
// Discover feeds
|
||||
Route::prefix('rss/discover')->name('rss.discover.')->group(function () {
|
||||
Route::get('/', [DiscoverFeedController::class, 'index'])->name('index');
|
||||
Route::get('/trending', [DiscoverFeedController::class, 'trending'])->name('trending');
|
||||
Route::get('/fresh', [DiscoverFeedController::class, 'fresh'])->name('fresh');
|
||||
Route::get('/rising', [DiscoverFeedController::class, 'rising'])->name('rising');
|
||||
});
|
||||
|
||||
// Explore category feeds
|
||||
Route::prefix('rss/explore')->name('rss.explore.')->group(function () {
|
||||
Route::get('/{type}', [ExploreFeedController::class, 'byType'])
|
||||
->where('type', 'artworks|wallpapers|skins|photography|other')
|
||||
->name('type');
|
||||
Route::get('/{type}/{mode}', [ExploreFeedController::class, 'byTypeMode'])
|
||||
->where('type', 'artworks|wallpapers|skins|photography|other')
|
||||
->where('mode', 'trending|latest|best')
|
||||
->name('type.mode');
|
||||
});
|
||||
|
||||
// Tag feeds
|
||||
Route::get('/rss/tag/{slug}', TagFeedController::class)
|
||||
->where('slug', '[a-z0-9\-]+')
|
||||
->name('rss.tag');
|
||||
|
||||
// Creator feeds
|
||||
Route::get('/rss/creator/{username}', CreatorFeedController::class)
|
||||
->where('username', '[A-Za-z0-9_\-]{3,20}')
|
||||
->name('rss.creator');
|
||||
|
||||
// Blog feed
|
||||
Route::get('/rss/blog', BlogFeedController::class)->name('rss.blog');
|
||||
});
|
||||
|
||||
// ── 301 REDIRECTS: Legacy → Canonical URLs ────────────────────────────────────
|
||||
// §6.1 — /browse → /explore
|
||||
Route::get('/browse-redirect', fn () => redirect('/explore', 301))->name('legacy.browse.redirect');
|
||||
@@ -137,8 +185,19 @@ Route::prefix('creators')->name('creators.')->group(function () {
|
||||
Route::get('/rising', [\App\Http\Controllers\Web\DiscoverController::class, 'risingCreators'])->name('rising');
|
||||
});
|
||||
|
||||
// Creator Stories → canonical rename of /interviews
|
||||
Route::get('/stories', [\App\Http\Controllers\Community\InterviewController::class, 'index'])->name('stories');
|
||||
// ── STORIES routes (/stories/*) — Nova Stories System ────────────────────────
|
||||
Route::prefix('stories')->name('stories.')->group(function () {
|
||||
Route::get('/', [StoriesController::class, 'index'])->name('index');
|
||||
Route::get('/tag/{tag}', [StoriesTagController::class, 'show'])
|
||||
->where('tag', '[a-z0-9\-]+')
|
||||
->name('tag');
|
||||
Route::get('/author/{username}', [StoriesAuthorController::class, 'show'])
|
||||
->where('username', '[A-Za-z0-9_\-]{1,50}')
|
||||
->name('author');
|
||||
Route::get('/{slug}', [StoryController::class, 'show'])
|
||||
->where('slug', '[a-z0-9\-]+')
|
||||
->name('show');
|
||||
});
|
||||
|
||||
// Tags listing page
|
||||
Route::get('/tags', [\App\Http\Controllers\Web\TagController::class, 'index'])->name('tags.index');
|
||||
@@ -410,6 +469,10 @@ require __DIR__.'/auth.php';
|
||||
Route::get('/search', [\App\Http\Controllers\Web\SearchController::class, 'index'])
|
||||
->name('search');
|
||||
|
||||
// Public instructions page used by OAuth providers for user data deletion requests
|
||||
Route::view('/data-deletion', 'privacy.data-deletion')
|
||||
->name('privacy.data_deletion');
|
||||
|
||||
Route::get('/tag/{tag:slug}', [\App\Http\Controllers\Web\TagController::class, 'show'])
|
||||
->where('tag', '[a-z0-9\-]+')
|
||||
->name('tags.show');
|
||||
|
||||
Reference in New Issue
Block a user