t
This commit is contained in:
parent
38d2108af0
commit
805621cb40
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
@ -82,7 +82,7 @@ async function searchElement(request, response) {
|
||||||
authenticate(token, response, search)
|
authenticate(token, response, search)
|
||||||
|
|
||||||
var elements = await db.get(word)
|
var elements = await db.get(word)
|
||||||
var elements = JSON.parse(elements);
|
// var elements = JSON.parse(elements);
|
||||||
|
|
||||||
if(elements) {
|
if(elements) {
|
||||||
var reply = elements
|
var reply = elements
|
||||||
|
@ -109,7 +109,7 @@ async function set(request, response) {
|
||||||
|
|
||||||
await db.set(element, data)
|
await db.set(element, data)
|
||||||
var res = await db.get(element)
|
var res = await db.get(element)
|
||||||
var res = JSON.parse(res);
|
// var res = JSON.parse(res);
|
||||||
if(res) {
|
if(res) {
|
||||||
var reply = res;
|
var reply = res;
|
||||||
} else {
|
} else {
|
||||||
|
@ -135,7 +135,7 @@ async function remove(request, response) {
|
||||||
|
|
||||||
await db.set(element, data)
|
await db.set(element, data)
|
||||||
var res = await db.delete(element)
|
var res = await db.delete(element)
|
||||||
var res = JSON.parse(res);
|
// var res = JSON.parse(res);
|
||||||
if(res) {
|
if(res) {
|
||||||
var reply = res
|
var reply = res
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue