* get todo details, will throw is not found * @param {String} id - todo id
(id)
| 35 | * @param {String} id - todo id |
| 36 | */ |
| 37 | async get(id) { |
| 38 | const item = await this.Todo.findByPk(id); |
| 39 | if (!item) this.ctx.throw(500, `task#${id} not found`); |
| 40 | return item; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * create todo |
no outgoing calls
no test coverage detected