http: prefix with v1

This commit is contained in:
Mitchell Hashimoto 2015-03-12 10:47:31 -07:00
parent 562ef24d83
commit 352ad00e68
2 changed files with 4 additions and 4 deletions

View File

@ -11,9 +11,9 @@ import (
// its own to mount the Vault API within another web server.
func Handler(core *vault.Core) http.Handler {
mux := http.NewServeMux()
mux.Handle("/sys/seal-status", handleSysSealStatus(core))
mux.Handle("/sys/seal", handleSysSeal(core))
mux.Handle("/sys/unseal", handleSysUnseal(core))
mux.Handle("/v1/sys/seal-status", handleSysSealStatus(core))
mux.Handle("/v1/sys/seal", handleSysSeal(core))
mux.Handle("/v1/sys/unseal", handleSysUnseal(core))
return mux
}

View File

@ -12,7 +12,7 @@ func TestSysSealStatus(t *testing.T) {
ln, addr := testServer(t, core)
defer ln.Close()
resp, err := http.Get(addr + "/sys/seal-status")
resp, err := http.Get(addr + "/v1/sys/seal-status")
if err != nil {
t.Fatalf("err: %s", err)
}