From 1e6a48e5dc2190f2b4b56df7d3c8c8dd74b70423 Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Tue, 5 Jul 2022 16:22:49 +0200 Subject: [PATCH] d --- index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index dc81c94..80a44c9 100644 --- a/index.js +++ b/index.js @@ -84,7 +84,7 @@ async function searchElement(request, response) { var elements = await db.get(word) if(elements) { - var reply = elements; + var reply = {elements}; } else { var reply = { status:"Not Found" @@ -109,10 +109,10 @@ async function set(request, response) { await db.set(element, data) const res = await db.get(element) if(res) { - var reply = res; + var reply = {res}; } else { var reply = { - status:"Not Found" + status:"404-Not Found" } } @@ -134,7 +134,9 @@ async function remove(request, response) { await db.set(element, data) const res = await db.delete(element) if(res) { - var reply = res; + var reply = { + res + }; } else { var reply = { status:"Not Found"