mirror of
https://github.com/strapi/strapi.git
synced 2025-10-18 19:43:22 +00:00
Fix typos
This commit is contained in:
parent
5a4b588ea2
commit
2f7927854b
@ -81,7 +81,7 @@ module.exports = {
|
|||||||
|
|
||||||
create(ctx) {
|
create(ctx) {
|
||||||
if (ctx.is('multipart')) {
|
if (ctx.is('multipart')) {
|
||||||
// parse the specific strapi's formData format and return the data and the files
|
// Parses strapi's formData format
|
||||||
const { data, files } = this.parseMultipartData(ctx);
|
const { data, files } = this.parseMultipartData(ctx);
|
||||||
return service.create(data, { files });
|
return service.create(data, { files });
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ module.exports = {
|
|||||||
|
|
||||||
update(ctx) {
|
update(ctx) {
|
||||||
if (ctx.is('multipart')) {
|
if (ctx.is('multipart')) {
|
||||||
// parse the specific strapi's formData format and return the data and the files
|
// Parses strapi's formData format
|
||||||
const { data, files } = this.parseMultipartData(ctx);
|
const { data, files } = this.parseMultipartData(ctx);
|
||||||
return service.update(ctx.params, data, { files });
|
return service.update(ctx.params, data, { files });
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ Strapi provides a utility function `strapi.query` to make database queries.
|
|||||||
|
|
||||||
You can just call `strapi.query(modelName, pluginName)` to access the query API for any model.
|
You can just call `strapi.query(modelName, pluginName)` to access the query API for any model.
|
||||||
|
|
||||||
Those queries handle for you specific Strapi features like `groups` `filters` and `search`.
|
These queries handle for you specific Strapi features like `groups`, `filters` and `search`.
|
||||||
|
|
||||||
## API Reference
|
## API Reference
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ strapi.query('post').findOne({ title: 'my title' });
|
|||||||
```js
|
```js
|
||||||
strapi
|
strapi
|
||||||
.query('post')
|
.query('post')
|
||||||
.findOne({ title: 'my title', created_at: '2019-01-01T00:00:00Z' });
|
.findOne({ title: 'my title', date: '2019-01-01T00:00:00Z' });
|
||||||
```
|
```
|
||||||
|
|
||||||
**Find one by id and populate a relation**
|
**Find one by id and populate a relation**
|
||||||
@ -174,7 +174,7 @@ strapi.query('post').update(
|
|||||||
|
|
||||||
### `delete`
|
### `delete`
|
||||||
|
|
||||||
Deletes and entry and return it's value before deletion.
|
Deletes and entry and return its value before deletion.
|
||||||
You can delete multiple entries at once with the passed params.
|
You can delete multiple entries at once with the passed params.
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
@ -217,7 +217,7 @@ strapi.query('post').count({ date_lt: '2019-08-01T00:00:00Z' });
|
|||||||
|
|
||||||
### `search`
|
### `search`
|
||||||
|
|
||||||
Returns entries base on a search on all fields allowing it. (this feature will return all entries on sqlite).
|
Returns entries based on a search on all fields allowing it. (this feature will return all entries on sqlite).
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ strapi
|
|||||||
|
|
||||||
### `countSearch`
|
### `countSearch`
|
||||||
|
|
||||||
Returns the total count of entries mattching a search. (this feature will return all entries on sqlite).
|
Returns the total count of entries based on a search. (this feature will return all entries on sqlite).
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user