Bugfix
This commit is contained in:
@@ -75,8 +75,8 @@ namespace Core\API\Routes {
|
||||
use Core\Objects\DatabaseEntity\Group;
|
||||
use Core\Objects\DatabaseEntity\Route;
|
||||
use Core\Objects\Router\ApiRoute;
|
||||
use Core\Objects\Router\EmptyRoute;
|
||||
use Core\Objects\Router\Router;
|
||||
use Core\Objects\Router\StaticRoute;
|
||||
|
||||
class Fetch extends RoutesAPI {
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace Core\API\Routes {
|
||||
$path = $this->getParam("path");
|
||||
$pattern = $this->getParam("pattern");
|
||||
$exact = $this->getParam("exact");
|
||||
$route = new StaticRoute($pattern, $exact, "");
|
||||
$route = new EmptyRoute($pattern, $exact, "");
|
||||
$this->result["match"] = $route->match($path);
|
||||
return $this->success;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class Logger {
|
||||
}, $debugTrace));
|
||||
}
|
||||
|
||||
public function log(string $message, string $severity, bool $appendStackTrace = true) {
|
||||
public function log(string $message, string $severity, bool $appendStackTrace = true): void {
|
||||
|
||||
if ($appendStackTrace) {
|
||||
$message .= "\n" . $this->getStackTrace();
|
||||
|
||||
@@ -44,4 +44,14 @@ class Group extends DatabaseEntity {
|
||||
new Group(Group::SUPPORT, Group::GROUPS[Group::SUPPORT], "#007bff"),
|
||||
];
|
||||
}
|
||||
|
||||
public function delete(SQL $sql): bool {
|
||||
if (parent::delete($sql)) {
|
||||
$handler = User::getHandler($sql);
|
||||
$table = $handler->getNMRelation("groups")->getTableName();
|
||||
return $sql->delete($table)->whereEq("group_id", $this->id)->execute();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user