docs: apply pr feedback

This commit is contained in:
Jim LAURIE 2020-04-09 11:41:55 +02:00
parent 390f72d512
commit 7216f21760
4 changed files with 8 additions and 8 deletions

View File

@ -189,7 +189,7 @@ You can access the config of the current environment through `strapi.config.curr
## Database
This file let you define database connections that will be used to store your application content.
This file lets you define database connections that will be used to store your application content.
You can find [supported database and versions](../installation/cli.html#databases) in the local installation process.
@ -241,7 +241,7 @@ You can find [supported database and versions](../installation/cli.html#database
- `database` (string): Database name.
- `username` (string): Username used to establish the connection.
- `password` (string): Password used to establish the connection.
- `uri` (string): This can overide all previous configurations - _optionnal_
- `uri` (string): This can overide all previous configurations - _optional_
- `options` Options used for database connection.
- `ssl` (boolean): For ssl database connection.
- `debug` (boolean): Show database exchanges and errors.

View File

@ -19,11 +19,9 @@ In this example, any time a web browser is pointed to the `/hello` URL on your a
The controllers are defined in each `./api/**/controllers/` folder. Every JavaScript file put in these folders will be loaded as a controller. They are also available through the `strapi.controllers` and `strapi.api.**.controllers` global variables.
By convention, controllers' names should be Pascal-cased, so that every word in the file (including the first one) is capitalized `User.js`, `LegalEntity.js`.
## Core controllers
When you create a new `Content Type` you will see a new empty controller has been created. It is because Strapi builds a generic controller for your models by default and allows you to override and extend it in the generated files.
When you create a new `Content Type` you will see a new empty controller has been created. This is because Strapi builds a generic controller for your models by default and allows you to override and extend it in the generated files.
### Extending a Model Controller
@ -217,7 +215,7 @@ You can also create custom controllers to build your own business logic and API
There are two ways to create a controller:
- Using the CLI `strapi generate:controller restaurant`.<br>Read the [CLI documentation](../cli/CLI.md#strapi-generatecontroller) for more information.
- Manually create a JavaScript file in `./api/**/controllers` respecting the Pascal-cased format.
- Manually create a JavaScript file in `./api/**/controllers`.
### Adding Endpoints

View File

@ -69,6 +69,8 @@ Every middleware will be injected into the Koa stack. To manage the load order,
To activate and configure your hook with custom options, you need to edit your `./config/environments/**/middleware.json` file in your Strapi app.
By default this file doesn't exist, you will have to create it.
```javascript
{
...

View File

@ -81,7 +81,7 @@ In this example, there is a `Simple` component which contains the attributes `na
For **Content Types**, models are defined in each `./api/**/models/` folder. Every JavaScript or JSON file in these folders will be loaded as a model. They are also available through the `strapi.models` and `strapi.api.**.models` global variables. Usable everywhere in the project, they contain the ORM model object that they refer to. By convention, a model's name should be written in lowercase.
For **Components**, models are defined in `./components` folder. Every components has to be under a subfolder (the category name of the component). They are also available through the `strapi.components` global variables. Usable everywhere in the project, they contain the ORM model object that they refer to.
For **Components**, models are defined in `./components` folder. Every components has to be under a subfolder (the category name of the component).
## How to create a model?
@ -215,7 +215,7 @@ To improve the Developer Experience when developing or using the administration
### Exceptions
- `uid` — This field type need a `targetField` key. The value is the name of an attribute thas has `string` of `text` type.
- `uid` — This field type allows a `targetField` key. The value is the name of an attribute thas has `string` of `text` type.
### Example