mirror of
https://github.com/strapi/strapi.git
synced 2025-10-17 19:13:25 +00:00
Update controllers.md (#7829)
Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>
This commit is contained in:
parent
f8437184ca
commit
66bffcb84e
@ -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!');
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user