Merge branch 'master' into master

This commit is contained in:
Jim LAURIE 2018-11-23 17:53:49 +01:00 committed by GitHub
commit 275f4ba9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Quick start
This section explains how to handle Strapi for the first time, ([check out our tutorial video](https://www.youtube.com/watch?v=yMl5IcFHA74)).
This section explains how to handle Strapi for the first time, ([check out our video tutorial](https://www.youtube.com/watch?v=yMl5IcFHA74)).
**Table of contents:**
- [1. Create your first project](#_1-create-a-project)
@ -170,7 +170,7 @@ axios
If you want to get a specific entry, add the `id` of the wanted post at the end of the url.
Examble with Axios:
Example with Axios:
```js
import axios from 'axios';
@ -194,7 +194,7 @@ axios
Use the `POST` route to create a new entry.
Examble with Axios:
Example with Axios:
```js
import axios from 'axios';
@ -221,7 +221,7 @@ axios
Use the `PUT` route to update an existing entry.
Examble with Axios:
Example with Axios:
```js
import axios from 'axios';
@ -250,7 +250,7 @@ axios
Use the `DELETE` route to delete an existing entry.
Examble with Axios:
Example with Axios:
```js
import axios from 'axios';

View File

@ -53,10 +53,22 @@ module.exports = {
if (!association) {
const fieldKey = `${strapiModel.collectionName}.${key}`;
if (_.isArray(value.value) && value.symbol !== 'IN') {
for (const value in value.value) {
for (let value in value.value) {
if (typeof value === 'string') {
value = {
value,
symbol: '='
};
}
qb[value ? 'where' : 'orWhere'](fieldKey, value.symbol, value.value[value]);
}
} else {
if (typeof value === 'string') {
value = {
value,
symbol: '='
};
}
qb.where(fieldKey, value.symbol, value.value);
}
} else {