g6.3
This commit is contained in:
1 parent
5ed63249a4
commit
e6d5e27c04
5 files changed
+60
-17
No files matched your search
@@ -33,6 +33,13 @@ class CouchDB {
|
||||
file_put_contents($this->db_file, str_replace(" ", "\t", json_encode($content, JSON_PRETTY_PRINT)));
|
||||
}
|
||||
|
||||
public function resetFile() {
|
||||
if (file_exists($this->db_file)) {
|
||||
unlink($this->db_file);
|
||||
}
|
||||
$this->setFile($this->getFile());
|
||||
}
|
||||
|
||||
public function sendError(string $msg, int $code = 404) :bool {
|
||||
http_response_code($code);
|
||||
$this->url_obj->send_json(["ok" => false, "reason" => $msg]);
|
||||
|
||||
Reference in new issue
Block a user