mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 20:07:51 +00:00
fix crash with missing set_bit requests
This commit is contained in:
parent
7ec48f2385
commit
4dd88570e4
1 changed files with 4 additions and 4 deletions
|
|
@ -395,27 +395,27 @@ func (self *WebService) HandleSetBit(w http.ResponseWriter, r *http.Request) {
|
|||
var results []interface{}
|
||||
for _, obj := range args {
|
||||
if obj["profile_id"] == nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
http.Error(w, "Missing Profile", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
t := float64(obj["profile_id"].(float64))
|
||||
profile_id := uint64(t)
|
||||
|
||||
if obj["db"] == nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
http.Error(w, "Missing db", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
db := obj["db"].(string)
|
||||
|
||||
if obj["frame"] == nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
http.Error(w, "Missing Frame", http.StatusBadRequest)
|
||||
return
|
||||
|
||||
}
|
||||
frame := obj["frame"].(string)
|
||||
|
||||
if obj["filter"] == nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
http.Error(w, "Missing Filter", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
t = float64(obj["filter"].(float64))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue