From 66bffcb84edef2c1fc5b96a2447ec4041c405af6 Mon Sep 17 00:00:00 2001 From: Mattias van den Belt Date: Fri, 11 Sep 2020 18:26:42 +0200 Subject: [PATCH] Update controllers.md (#7829) Signed-off-by: MattieBelt --- docs/v3.x/concepts/controllers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/v3.x/concepts/controllers.md b/docs/v3.x/concepts/controllers.md index 847342db54..48ceef854f 100644 --- a/docs/v3.x/concepts/controllers.md +++ b/docs/v3.x/concepts/controllers.md @@ -7,7 +7,7 @@ Controllers are JavaScript files which contain a set of methods called **actions ```js module.exports = { // GET /hello - index: async ctx => { + async index(ctx) { return 'Hello World!'; }, }; @@ -340,7 +340,7 @@ Our `index` action will return `Hello World!`. You can also return a JSON object ```js module.exports = { // GET /hello - index: async ctx => { + async index(ctx) { ctx.send('Hello World!'); }, };