(id, updatedTask)
| 2728 | } |
| 2729 | |
| 2730 | update(id, updatedTask) { |
| 2731 | const task = this.tasks[id]; |
| 2732 | if (typeof task !== 'undefined') { |
| 2733 | const mergedTask = { |
| 2734 | id: task.id, |
| 2735 | name: task.name, |
| 2736 | created_at: task.created_at, |
| 2737 | total_items: updatedTask.total_items || task.total_items, |
| 2738 | completed_items: updatedTask.completed_items || task.completed_items, |
| 2739 | updated_at: new Date().toJSON() |
| 2740 | }; |
| 2741 | this.tasks[id] = mergedTask; |
| 2742 | } |
| 2743 | return this.tasks; |
| 2744 | } |
| 2745 | } |
| 2746 | |
| 2747 | PouchDB.adapters = {}; |
no outgoing calls
no test coverage detected