diff options
| author | Leo Goetz <dev@leogtz.de> | 2025-11-09 14:19:26 +0100 |
|---|---|---|
| committer | Leo Goetz <dev@leogtz.de> | 2025-11-09 14:19:26 +0100 |
| commit | 789d28b83af165258dc7e8b3a44bbd2d48fcc370 (patch) | |
| tree | e98ef728fb42a7bc03aef6d6a601e0533a4961b3 /src/db.js | |
| parent | 16a0e9a9d2c24af28142ed3420ef6cb373c454f7 (diff) | |
added crud functionality with json file as a db
Diffstat (limited to 'src/db.js')
| -rw-r--r-- | src/db.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -14,4 +14,7 @@ export const saveDB = async (db) => { export const insertDB = async (note) => { const db = await getDB(); + db.notes.push(note); + await saveDB(db); + return note; }; |
