(id, item)
| 81 | } |
| 82 | |
| 83 | async function updateItem(id, item) { |
| 84 | return new Promise((acc, rej) => { |
| 85 | db.run( |
| 86 | 'UPDATE todo_items SET name=?, completed=? WHERE id = ?', |
| 87 | [item.name, item.completed ? 1 : 0, id], |
| 88 | err => { |
| 89 | if (err) return rej(err); |
| 90 | acc(); |
| 91 | }, |
| 92 | ); |
| 93 | }); |
| 94 | } |
| 95 | |
| 96 | async function removeItem(id) { |
| 97 | return new Promise((acc, rej) => { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…