Proper response status
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2022-01-20 00:43:00 +01:00
parent 525e11eb6a
commit f71e19aec4

View file

@ -160,11 +160,12 @@ func handle(ctx *httputils.RequestContext) {
}
return
} else if pathElements[3] == "drop" { //Drop key from cache
ctx.SetResponseCode(http.StatusOK)
ctx.SetResponseCode(http.StatusNoContent)
_ = db.RemoveEntry(key)
if entry != nil && !entry.Key.Equals(key) {
_ = db.RemoveEntry(&entry.Key)
}
ctx.ServeBytes([]byte{})
return
}