(item)
| 68 | } |
| 69 | |
| 70 | async function storeItem(item) { |
| 71 | return new Promise((acc, rej) => { |
| 72 | db.run( |
| 73 | 'INSERT INTO todo_items (id, name, completed) VALUES (?, ?, ?)', |
| 74 | [item.id, item.name, item.completed ? 1 : 0], |
| 75 | err => { |
| 76 | if (err) return rej(err); |
| 77 | acc(); |
| 78 | }, |
| 79 | ); |
| 80 | }); |
| 81 | } |
| 82 | |
| 83 | async function updateItem(id, item) { |
| 84 | return new Promise((acc, rej) => { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…