fix(eslint) Run lint-fix
This commit is contained in:
parent
ea000dcfc8
commit
eb5c3acf7c
2 changed files with 61 additions and 62 deletions
server
|
@ -22,23 +22,23 @@ function getResults (input) {
|
||||||
if (input.size === undefined) input.size = 10;
|
if (input.size === undefined) input.size = 10;
|
||||||
if (input.from === undefined) input.from = 0;
|
if (input.from === undefined) input.from = 0;
|
||||||
return eclient.search({
|
return eclient.search({
|
||||||
index: "claims",
|
index : 'claims',
|
||||||
_source: ["name", "value", "claimId"],
|
_source: ['name', 'value', 'claimId'],
|
||||||
body: {
|
body : {
|
||||||
"query": {
|
'query': {
|
||||||
"bool": {
|
'bool': {
|
||||||
"must": {
|
'must': {
|
||||||
"query_string": {
|
'query_string': {
|
||||||
"query": '*' + input.s.trim() + '*',
|
'query' : '*' + input.s.trim() + '*',
|
||||||
"fields": [
|
'fields': [
|
||||||
"name",
|
'name',
|
||||||
"value.stream.metadata.author",
|
'value.stream.metadata.author',
|
||||||
"value.stream.metadata.title",
|
'value.stream.metadata.title',
|
||||||
"value.stream.metadata.description"
|
'value.stream.metadata.description',
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
size: input.size,
|
size: input.size,
|
||||||
from: input.from,
|
from: input.from,
|
||||||
|
@ -50,22 +50,22 @@ function getAutoComplete (input) {
|
||||||
if (input.size === undefined) input.size = 10;
|
if (input.size === undefined) input.size = 10;
|
||||||
if (input.from === undefined) input.from = 0;
|
if (input.from === undefined) input.from = 0;
|
||||||
return eclient.search({
|
return eclient.search({
|
||||||
index: "claims",
|
index : 'claims',
|
||||||
_source: ["name", "value.stream.metadata.title", "value.stream.metadata.author"],
|
_source: ['name', 'value.stream.metadata.title', 'value.stream.metadata.author'],
|
||||||
body: {
|
body : {
|
||||||
"query": {
|
'query': {
|
||||||
"bool": {
|
'bool': {
|
||||||
"must": {
|
'must': {
|
||||||
"query_string": {
|
'query_string': {
|
||||||
"query": "*" + input.s.trim() + "*",
|
'query' : '*' + input.s.trim() + '*',
|
||||||
"fields": [
|
'fields': [
|
||||||
"name",
|
'name',
|
||||||
"value.stream.metadata.title",
|
'value.stream.metadata.title',
|
||||||
"value.stream.metadata.author"
|
'value.stream.metadata.author',
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
size: input.size,
|
size: input.size,
|
||||||
from: input.from,
|
from: input.from,
|
||||||
|
|
|
@ -27,7 +27,7 @@ const eclient = new elasticsearch.Client({
|
||||||
});
|
});
|
||||||
const queue = new ElasticQueue({elastic: eclient});
|
const queue = new ElasticQueue({elastic: eclient});
|
||||||
|
|
||||||
//Get the lbrycrd config from the .lbrycrd folder.
|
// Get the lbrycrd config from the .lbrycrd folder.
|
||||||
function getClient () {
|
function getClient () {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fileExists(path.join(os.homedir(), '.lbrycrd/lbrycrd.conf'), (err, exists) => {
|
fileExists(path.join(os.homedir(), '.lbrycrd/lbrycrd.conf'), (err, exists) => {
|
||||||
|
@ -56,12 +56,11 @@ function getClient () {
|
||||||
});
|
});
|
||||||
resolve(client);
|
resolve(client);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that our cache file exist.
|
||||||
//Check that our cache file exist.
|
|
||||||
fileExists(path.join(appRoot.path, 'claimTrieCache.json'), (err, exists) => {
|
fileExists(path.join(appRoot.path, 'claimTrieCache.json'), (err, exists) => {
|
||||||
if (err) { throw err };
|
if (err) { throw err };
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue