summaryrefslogtreecommitdiffstats
path: root/src/dkv/api/queryDatastoreHandlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dkv/api/queryDatastoreHandlers.go')
-rw-r--r--src/dkv/api/queryDatastoreHandlers.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dkv/api/queryDatastoreHandlers.go b/src/dkv/api/queryDatastoreHandlers.go
index 4197ac0..ce1a706 100644
--- a/src/dkv/api/queryDatastoreHandlers.go
+++ b/src/dkv/api/queryDatastoreHandlers.go
@@ -36,9 +36,9 @@ type ResponseGETSStruct struct {
func HandleGET(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
- key := vars["token"] + "/" + vars["key"]
+ key := vars["key"]
- value, err := Datastore.RequestGET(key)
+ value, err := Datastore.RequestGET(vars["token"], key)
if err != nil {
req := ResponseStringStruct{Response: string(err.Error())}
@@ -70,9 +70,8 @@ func HandleGETS(w http.ResponseWriter, r *http.Request) {
func HandleDELETE(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
- key := vars["key"]
- err := Datastore.RequestDELETE(key)
+ err := Datastore.RequestDELETE(vars["token"], vars["key"])
if err != nil {
req := ResponseStringStruct{Response: string(err.Error())}