Skip to content

Commit

Permalink
Merge pull request #385 from aholachek/change-logout
Browse files Browse the repository at this point in the history
changed logout endpoint from GET to POST
  • Loading branch information
aholachek committed May 11, 2015
2 parents 068b4fb + 1c83d4a commit 885f154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/components/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ define([
query : new ApiQuery({}),
options : {
context : this,
type : "GET",
type : "POST",
headers : {'X-CSRFToken' : csrfToken },
contentType : "application/json",
done : this.logoutSuccess
Expand Down
2 changes: 1 addition & 1 deletion test/mocha/js/components/session.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ define([

expect(requestStub.args[1][0]).to.be.instanceof(ApiRequest)
expect(requestStub.args[1][0].toJSON().target).to.eql("accounts/logout");
expect(requestStub.args[1][0].toJSON().options.type).to.eql("GET");
expect(requestStub.args[1][0].toJSON().options.type).to.eql("POST");
expect(requestStub.args[1][0].toJSON().options.done).to.eql(s.logoutSuccess);

s.register({email: "[email protected]", password1 : "foo", password2 : "foo", "g-recaptcha-response" : "boo"});
Expand Down

0 comments on commit 885f154

Please sign in to comment.