()
| 38 | } |
| 39 | |
| 40 | async function getItems() { |
| 41 | return new Promise((acc, rej) => { |
| 42 | db.all('SELECT * FROM todo_items', (err, rows) => { |
| 43 | if (err) return rej(err); |
| 44 | acc( |
| 45 | rows.map(item => |
| 46 | Object.assign({}, item, { |
| 47 | completed: item.completed === 1, |
| 48 | }), |
| 49 | ), |
| 50 | ); |
| 51 | }); |
| 52 | }); |
| 53 | } |
| 54 | |
| 55 | async function getItem(id) { |
| 56 | return new Promise((acc, rej) => { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…