Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,9 @@ function SugarApi(args) {
payload.client_info = data;

var method = 'create';
var url = this.buildURL('Leads', 'register', payload);
var url = this.buildURL('Contacts', 'register', payload, {
platform: _platform
});
return this.call(method, url, payload, callbacks);
},

Expand Down
4 changes: 2 additions & 2 deletions test/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ describe('Api client', function () {
});

describe('signup', function () {
it('should register a lead', function () {
it('should register a contact', function () {
let spy = sinon.spy(this.callbacks, 'success');
let firstName = 'John';
let lastName = 'Doe';
Expand All @@ -1648,7 +1648,7 @@ describe('Api client', function () {

this.server.respondWith(
'POST',
'/rest/v10/Leads/register',
'/rest/v10/Contacts/register?platform=',
[200, {'Content-Type': 'application/json'}, JSON.stringify(expectedAttributes)]
);

Expand Down