Forgot to specify that logout is post (#136)

This commit is contained in:
Mike Arpaia
2016-09-07 22:58:25 -04:00
committed by GitHub
parent e7cabd0b73
commit 8bf2b7ee7b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func attachAPIRoutes(router *mux.Router, ctx context.Context, svc kolide.Service
encodeResponse,
opts...,
),
)
).Methods("POST")
router.Handle("/api/v1/kolide/users",
kithttp.NewServer(
+1 -1
View File
@@ -133,7 +133,7 @@ func TestLogin(t *testing.T) {
assert.NotEqual(t, "", sessions[0].Key)
// test logout
req, _ := http.NewRequest("GET", server.URL+"/api/v1/kolide/logout", nil)
req, _ := http.NewRequest("POST", server.URL+"/api/v1/kolide/logout", nil)
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", jsn.Token))
client := &http.Client{}
resp, err = client.Do(req)