This commit is contained in:
2023-04-26 22:41:36 +08:00
parent 7f2141e832
commit 6d2c0d8cb3
8 changed files with 37 additions and 8 deletions

View File

@@ -27,6 +27,9 @@ class Store {
}
public async update(record: Record<string, string>) {
this.record = record;
await this.save();
}
public async save() {
await write(this.filename, JSON.stringify(this.record), "utf8");
}
}