Skip to content

Commit

Permalink
update LOGIN endpoint usage and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Mar 14, 2024
1 parent f587baa commit e4320a7
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 @@ -65,7 +65,7 @@ define([

this.sendRequestWithNewCSRF(function(csrfToken) {
var request = new ApiRequest({
target: ApiTargets.USER,
target: ApiTargets.LOGIN,
query: new ApiQuery({}),
options: {
type: 'POST',
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 @@ -57,7 +57,7 @@ define([
csrfManager.resolvePromiseWithNewKey();

expect(requestStub.args[0][0]).to.be.instanceof(ApiRequest);
expect(requestStub.args[0][0].toJSON().target).to.eql('accounts/user');
expect(requestStub.args[0][0].toJSON().target).to.eql('accounts/user/login');
expect(requestStub.args[0][0].toJSON().options.type).to.eql('POST');
expect(requestStub.args[0][0].toJSON().options.data).to.eql(
'{"username":"goo","password":"foo","g-recaptcha-response":"boo"}'
Expand Down

0 comments on commit e4320a7

Please sign in to comment.