Fix linting issues
This commit is contained in:
parent
d2332dc308
commit
c766290bf7
|
@ -13,7 +13,7 @@ export function createQuery (json, queryOptions) {
|
||||||
const { sort, filter, projection } = queryOptions
|
const { sort, filter, projection } = queryOptions
|
||||||
let query = ''
|
let query = ''
|
||||||
|
|
||||||
if (!!filter) {
|
if (filter) {
|
||||||
const examplePath = filter.field !== '@'
|
const examplePath = filter.field !== '@'
|
||||||
? ['0'].concat(parsePath('.' + filter.field))
|
? ['0'].concat(parsePath('.' + filter.field))
|
||||||
: ['0']
|
: ['0']
|
||||||
|
@ -33,7 +33,7 @@ export function createQuery (json, queryOptions) {
|
||||||
: '@'
|
: '@'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!sort) {
|
if (sort) {
|
||||||
if (sort.direction === 'desc') {
|
if (sort.direction === 'desc') {
|
||||||
query += ' | reverse(sort_by(@, &' + sort.field + '))'
|
query += ' | reverse(sort_by(@, &' + sort.field + '))'
|
||||||
} else {
|
} else {
|
||||||
|
@ -41,7 +41,7 @@ export function createQuery (json, queryOptions) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!projection) {
|
if (projection) {
|
||||||
if (query[query.length - 1] !== ']') {
|
if (query[query.length - 1] !== ']') {
|
||||||
query += ' | [*]'
|
query += ' | [*]'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue