You've already forked Atomcms-edit
Fix remaining issues: pagination, throttle, i18n, config defaults, indexes
- Add pagination to ShopController (50 per page)
- Add throttle:3,10 to radio application store route
- Replace mixed Dutch/English labels in RadioWizardController (English only)
- Replace Dutch error messages in RadioController and RadioSetupController
- Add config('habbo.defaults.avatar_look') for SocialAuthController
- Remove hardcoded default stream URL from RadioSetupController
- Add database indexes for radio_listener_points.earned_at and bans.ip
This commit is contained in:
@@ -268,7 +268,7 @@ class RadioController extends Controller
|
||||
|
||||
if ($activeSession) {
|
||||
return response()->json([
|
||||
'error' => 'Je hebt al een actieve sessie',
|
||||
'error' => 'You already have an active session',
|
||||
'session_id' => $activeSession->id,
|
||||
], 400);
|
||||
}
|
||||
@@ -280,7 +280,7 @@ class RadioController extends Controller
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Sessie gestart',
|
||||
'message' => 'Session started',
|
||||
'session_id' => $session->id,
|
||||
]);
|
||||
}
|
||||
@@ -292,13 +292,13 @@ class RadioController extends Controller
|
||||
$activeSession = RadioHistory::where('user_id', $userId)->whereNull('ended_at')->first();
|
||||
|
||||
if (! $activeSession) {
|
||||
return response()->json(['error' => 'Geen actieve sessie gevonden'], 404);
|
||||
return response()->json(['error' => 'No active session found'], 404);
|
||||
}
|
||||
|
||||
$activeSession->endSession();
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Sessie beëindigd',
|
||||
'message' => 'Session ended',
|
||||
'duration' => $activeSession->duration,
|
||||
]);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ class RadioController extends Controller
|
||||
public function getShouts(): JsonResponse
|
||||
{
|
||||
if (! $this->getSetting(RadioSettings::ShoutsEnabled)) {
|
||||
return response()->json(['error' => 'Shouts zijn uitgeschakeld', 'shouts' => []], 403);
|
||||
return response()->json(['error' => 'Shouts are disabled', 'shouts' => []], 403);
|
||||
}
|
||||
|
||||
$shouts = Cache::remember('api_radio_shouts', 30, fn () => RadioShout::with('user:id,username')
|
||||
@@ -315,7 +315,7 @@ class RadioController extends Controller
|
||||
->get()
|
||||
->map(fn ($shout) => [
|
||||
'id' => $shout->id,
|
||||
'username' => $shout->user?->username ?? 'Anoniem',
|
||||
'username' => $shout->user?->username ?? 'Anonymous',
|
||||
'message' => $shout->message,
|
||||
'created_at' => $shout->created_at->diffForHumans(),
|
||||
]));
|
||||
|
||||
Reference in New Issue
Block a user