fix index inconsistence in v1 api

This commit is contained in:
Xiang Li
2013-12-11 11:12:39 -08:00
parent f66bd1689d
commit a5bca025b1
4 changed files with 14 additions and 4 deletions

View File

@@ -260,7 +260,7 @@ func (s *Server) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Reque
var b []byte
if strings.HasPrefix(req.URL.Path, "/v1") {
b, _ = json.Marshal(result.(*store.Event).Response())
b, _ = json.Marshal(result.(*store.Event).Response(0))
w.WriteHeader(http.StatusOK)
} else {
e, _ := result.(*store.Event)