diff --git a/app/Http/Controllers/API/v1/ExperimentalController.php b/app/Http/Controllers/API/v1/ExperimentalController.php index aaadd5f40..38cf4cc0c 100644 --- a/app/Http/Controllers/API/v1/ExperimentalController.php +++ b/app/Http/Controllers/API/v1/ExperimentalController.php @@ -40,7 +40,7 @@ public function fetchWikidata(int $stationId): JsonResponse { private static function checkGeneralRateLimit(): bool { $key = "fetch-wikidata-user:" . auth()->id(); - if (RateLimiter::tooManyAttempts($key, 10)) { + if (RateLimiter::tooManyAttempts($key, 20)) { return false; } RateLimiter::increment($key); diff --git a/app/Http/Controllers/Frontend/OpenData/WikidataController.php b/app/Http/Controllers/Frontend/OpenData/WikidataController.php index 7ae5583ab..45a4c048a 100644 --- a/app/Http/Controllers/Frontend/OpenData/WikidataController.php +++ b/app/Http/Controllers/Frontend/OpenData/WikidataController.php @@ -12,13 +12,10 @@ public function indexHelpPage(): View { //get stations the user was travelling recently, without a wikidata id $destinationStationsWithoutWikidata = Station::join('train_stopovers', 'train_stations.id', '=', 'train_stopovers.train_station_id') - ->join('train_checkins', 'train_checkins.destination_stopover_id', '=', 'train_stopovers.id') - ->where('train_checkins.user_id', auth()->id()) - ->where('train_stations.ibnr', '>', 1000000) + ->where('train_stations.ibnr', '>', 8000000) ->whereNull('train_stations.wikidata_id') ->select('train_stations.*') ->limit(50) - ->orderByDesc('train_checkins.created_at') ->distinct() ->get();