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,7 +28,14 @@ class GetApiKeys extends Request {
$this->lastError = $sql->getLastError();
if($this->success) {
$this->result["api_keys"] = $res;
$this->result["api_keys"] = array();
foreach($res as $row) {
$this->result["api_keys"][] = array(
"uid" => $row["uid"],
"api_key" => $row["api_key"],
"valid_until" => (new \DateTime($row["valid_until"]))->getTimestamp(),
);
}
}
return $this->success;