We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 763aa48 commit bdfb83cCopy full SHA for bdfb83c
Database.php
@@ -22,6 +22,14 @@ function save() {
22
file_put_contents(__DIR__.'/localdb.json', json_encode($this->db));
23
}
24
25
+ function reload() {
26
+ file_put_contents(__DIR__.'/localdb.json', json_encode($this->db));
27
+
28
+ if (file_exists(__DIR__.'/localdb.json')) {
29
+ $this->db = json_decode(file_get_contents(__DIR__.'/localdb.json'), true);
30
+ }
31
32
33
function createUser(int $userId) {
34
$this->db[$userId] = [
35
"userId" => $userId,
0 commit comments