({ offset = 0, limit = 10 })
| 4 | |
| 5 | class User extends Service { |
| 6 | async list({ offset = 0, limit = 10 }) { |
| 7 | return this.ctx.model.User.findAndCountAll({ |
| 8 | offset, |
| 9 | limit, |
| 10 | order: [[ 'created_at', 'desc' ], [ 'id', 'desc' ]], |
| 11 | }); |
| 12 | } |
| 13 | |
| 14 | async find(id) { |
| 15 | const user = await this.ctx.model.User.findByPk(id); |
no outgoing calls
no test coverage detected