Compare commits

...

2 Commits

Author SHA1 Message Date
Yasen Pramatarov ae8d84012b Bugfixes 2025-02-17 15:41:35 +02:00
Yasen Pramatarov ddb86eae51 Bugfixes 2025-02-17 15:40:34 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
// Get any flash messages from previous request
$flash_messages = Feedback::getFlash();
if (!empty($flash_messages)) {
$messages = array_merge($messages, array_map(function($flash) {
$system_messages = array_merge($system_messages, array_map(function($flash) {
return [
'category' => $flash['category'],
'key' => $flash['key'],

View File

@ -11,7 +11,7 @@ require_once __DIR__ . '/../classes/ratelimiter.php';
* @return bool True if request is allowed, false if rate limited
*/
function checkRateLimit($database, $endpoint, $userId = null) {
$rateLimiter = new RateLimiter($database);
$rateLimiter = new RateLimiter($database['db']);
$ipAddress = $_SERVER['REMOTE_ADDR'];
// Check if request is allowed