docker: gd extension + 2FA Bugfix

This commit is contained in:
Roman Hergenreder
2022-11-27 15:58:44 +01:00
parent 26a22f5299
commit c9a7da688f
13 changed files with 241 additions and 182 deletions

View File

@@ -24,11 +24,16 @@ class DocumentRoute extends Route {
$this->extra = json_encode($args);
}
public function postFetch(SQL $sql, array $row) {
parent::postFetch($sql, $row);
protected function readExtra() {
parent::readExtra();
$this->args = json_decode($this->extra);
}
public function preInsert(array &$row) {
parent::preInsert($row);
$this->extra = json_encode($this->args);
}
#[Pure] private function getClassName(): string {
return $this->getTarget();
}

View File

@@ -22,11 +22,16 @@ class StaticFileRoute extends Route {
$this->extra = json_encode($this->code);
}
public function postFetch(SQL $sql, array $row) {
parent::postFetch($sql, $row);
protected function readExtra() {
parent::readExtra();
$this->code = json_decode($this->extra);
}
public function preInsert(array &$row) {
parent::preInsert($row);
$this->extra = json_encode($this->code);
}
public function call(Router $router, array $params): string {
http_response_code($this->code);
$this->serveStatic($this->getAbsolutePath(), $router);