b
This commit is contained in:
parent
9b734496cb
commit
6be6da59ae
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
@ -105,9 +105,9 @@ async function set(request, response) {
|
||||||
var data = request.params.data;
|
var data = request.params.data;
|
||||||
|
|
||||||
set = 'set '+element+' to '+data
|
set = 'set '+element+' to '+data
|
||||||
authenticate(token, set)
|
authenticate(token, response, set)
|
||||||
|
|
||||||
await db.set(element, response, data)
|
await db.set(element, data)
|
||||||
const res = await db.get(element)
|
const res = await db.get(element)
|
||||||
if(res) {
|
if(res) {
|
||||||
var reply = res;
|
var reply = res;
|
||||||
|
@ -132,7 +132,7 @@ async function remove(request, response) {
|
||||||
set = 'remove '+element
|
set = 'remove '+element
|
||||||
authenticate(token, response, set)
|
authenticate(token, response, set)
|
||||||
|
|
||||||
await db.set(element, response, data)
|
await db.set(element, data)
|
||||||
const res = await db.delete(element)
|
const res = await db.delete(element)
|
||||||
if(res) {
|
if(res) {
|
||||||
var reply = res;
|
var reply = res;
|
||||||
|
|
Loading…
Reference in a new issue