ApiKeys fixed + tests

This commit is contained in:
2020-04-02 16:31:17 +02:00
parent cc334eb62d
commit 541b8563d5
6 changed files with 60 additions and 13 deletions

View File

@@ -28,9 +28,13 @@ class CreateApiKey extends Request {
$this->lastError = $sql->getLastError();
if ($this->success) {
$this->result["api_key"] = $apiKey;
$this->result["valid_until"] = $validUntil->getTimestamp();
$this->result["uid"] = $sql->getLastInsertId();
$this->result["api_key"] = array(
"api_key" => $apiKey,
"valid_until" => $validUntil->getTimestamp(),
"uid" => $sql->getLastInsertId(),
);
} else {
$this->result["api_key"] = null;
}
return $this->success;
}