🗓️ Add MeetupEventFactory, implement rate limiting for calendar downloads, and enhance test coverage

- **Added:** `MeetupEventFactory` for generating test data.
- **Implemented:** Rate limiting (`throttle:calendar`) for `stream-calendar` routes to prevent abuse.
- **Enhanced:** `DownloadMeetupCalendar` controller with validation and cleaner query structure.
- **Added:** Feature tests for calendar downloading, invalid input handling, and rate limiting.
This commit is contained in:
HolgerHatGarKeineNode
2026-01-17 21:18:55 +01:00
parent d3acc365fd
commit da1324adda
5 changed files with 140 additions and 24 deletions

View File

@@ -56,7 +56,8 @@ Route::livewire('/welcome', 'welcome')->name('welcome');
// Stream calendar route to download meetup calendar as ICS file
Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
->name('ics');
->name('ics')
->middleware('throttle:calendar');
// Dashboard redirect route for authenticated users, redirects to German dashboard
Route::middleware(['auth'])
@@ -78,7 +79,8 @@ Route::middleware([])
/* OLD URLS - redirects for legacy URLs */
// Redirect old meetup calendar route to new one
Route::get('meetup/stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
->name('ics');
->name('ics')
->middleware('throttle:calendar');
// Redirect old meetup overview URL to new meetups page
Route::get('/meetup/overview', function ($country) {
return redirect("/{$country}/meetups");