mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-02 02:48:05 +00:00
fix a bug found in test
This commit is contained in:
@@ -190,16 +190,16 @@ func (e mainEnv) userChange(w http.ResponseWriter, r *http.Request, ps httproute
|
||||
userJSON, userBSON, err = e.db.getUser(address)
|
||||
} else {
|
||||
userJSON, userTOKEN, userBSON, err = e.db.getUserByIndex(address, mode, e.conf)
|
||||
if err != nil {
|
||||
returnError(w, r, "internal error", 405, err, event)
|
||||
return
|
||||
}
|
||||
if userJSON == nil {
|
||||
returnError(w, r, "user record not found", 405, nil, event)
|
||||
return
|
||||
}
|
||||
event.Record = userTOKEN
|
||||
}
|
||||
if err != nil {
|
||||
returnError(w, r, "internal error", 405, err, event)
|
||||
return
|
||||
}
|
||||
if userJSON == nil {
|
||||
returnError(w, r, "user record not found", 405, nil, event)
|
||||
return
|
||||
}
|
||||
authResult := e.enforceAuth(w, r, event)
|
||||
if authResult == "" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user