Removed AdminLTE, some minor improvements

This commit is contained in:
2024-05-02 14:16:04 +02:00
parent 163ef9fbfe
commit fb353d1bc8
36 changed files with 916 additions and 873 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Core\API;
use Core\Objects\Context;
use Core\Objects\DatabaseEntity\Group;
class TestRedis extends Request {
public function __construct(Context $context, bool $externalCall = false) {
parent::__construct($context, $externalCall, []);
}
protected function _execute(): bool {
$settings = $this->context->getSettings();
if (!$settings->isRateLimitingEnabled()) {
return $this->createError("Rate Limiting is currently disabled");
}
$connection = $this->context->getRedis();
if ($connection === null || !$connection->isConnected()) {
return $this->createError("Redis connection failed");
}
return $this->success;
}
public static function getDescription(): string {
return "Allows users to test the redis connection with the configured credentials.";
}
public static function getDefaultPermittedGroups(): array {
return [Group::ADMIN];
}
}