mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat add dir_flag
This commit is contained in:
@@ -9,6 +9,6 @@ import (
|
||||
func DeleteKeyHandler(w http.ResponseWriter, req *http.Request, s Server) error {
|
||||
vars := mux.Vars(req)
|
||||
key := "/" + vars["key"]
|
||||
c := s.Store().CommandFactory().CreateDeleteCommand(key, false)
|
||||
c := s.Store().CommandFactory().CreateDeleteCommand(key, false, false)
|
||||
return s.Dispatch(c, w, req)
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ func SetKeyHandler(w http.ResponseWriter, req *http.Request, s Server) error {
|
||||
c = s.Store().CommandFactory().CreateCompareAndSwapCommand(key, value, prevValueArr[0], 0, expireTime)
|
||||
} else {
|
||||
// test against existence
|
||||
c = s.Store().CommandFactory().CreateCreateCommand(key, value, expireTime, false)
|
||||
c = s.Store().CommandFactory().CreateCreateCommand(key, false, value, expireTime, false)
|
||||
}
|
||||
|
||||
} else {
|
||||
c = s.Store().CommandFactory().CreateSetCommand(key, value, expireTime)
|
||||
c = s.Store().CommandFactory().CreateSetCommand(key, false, value, expireTime)
|
||||
}
|
||||
|
||||
return s.Dispatch(c, w, req)
|
||||
|
||||
Reference in New Issue
Block a user