(item)
| 90 | } |
| 91 | |
| 92 | async function storeItem(item) { |
| 93 | return new Promise((acc, rej) => { |
| 94 | pool.query( |
| 95 | 'INSERT INTO todo_items (id, name, completed) VALUES (?, ?, ?)', |
| 96 | [item.id, item.name, item.completed ? 1 : 0], |
| 97 | err => { |
| 98 | if (err) return rej(err); |
| 99 | acc(); |
| 100 | }, |
| 101 | ); |
| 102 | }); |
| 103 | } |
| 104 | |
| 105 | async function updateItem(id, item) { |
| 106 | return new Promise((acc, rej) => { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…