rename, delete connection folder #425

This commit is contained in:
Jan Prochazka
2023-01-01 12:16:59 +01:00
parent 2151252032
commit d5e240a701
5 changed files with 66 additions and 4 deletions

View File

@@ -90,6 +90,12 @@ class JsonLinesDatabase {
return obj;
}
async updateAll(mapFunction) {
await this._ensureLoaded();
this.data = this.data.map(mapFunction);
await this._save();
}
async patch(id, values) {
await this._ensureLoaded();
this.data = this.data.map(x => (x._id == id ? { ...x, ...values } : x));