()
| 4 | |
| 5 | class PostController extends Controller { |
| 6 | async index() { |
| 7 | const ctx = this.ctx; |
| 8 | const query = { |
| 9 | limit: ctx.helper.parseInt(ctx.query.limit), |
| 10 | offset: ctx.helper.parseInt(ctx.query.offset), |
| 11 | }; |
| 12 | ctx.body = await ctx.service.post.list(query); |
| 13 | } |
| 14 | |
| 15 | async show() { |
| 16 | const ctx = this.ctx; |