Proper response status
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
525e11eb6a
commit
f71e19aec4
|
@ -160,11 +160,12 @@ func handle(ctx *httputils.RequestContext) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else if pathElements[3] == "drop" { //Drop key from cache
|
} else if pathElements[3] == "drop" { //Drop key from cache
|
||||||
ctx.SetResponseCode(http.StatusOK)
|
ctx.SetResponseCode(http.StatusNoContent)
|
||||||
_ = db.RemoveEntry(key)
|
_ = db.RemoveEntry(key)
|
||||||
if entry != nil && !entry.Key.Equals(key) {
|
if entry != nil && !entry.Key.Equals(key) {
|
||||||
_ = db.RemoveEntry(&entry.Key)
|
_ = db.RemoveEntry(&entry.Key)
|
||||||
}
|
}
|
||||||
|
ctx.ServeBytes([]byte{})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue