Skip to content

Commit c146c98

Browse files
committed
unfix applicationsettings plural
1 parent 1a67f9b commit c146c98

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/sipPeer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ SipPeer.prototype.listApplications = function(callback) {
9696

9797
SipPeer.prototype.editApplications = function(appData, callback) {
9898
var url = this.client.concatAccountPath(SITE_PATH + "/" + this.siteId + "/" + SIP_PEER_PATH + "/" + this.id + "/" + "products" + "/" + "messaging" + "/" + "applicationSettings");
99-
const data = {applicationSettings: appData}
99+
const data = {applicationsSettings: appData}
100100
this.client.makeRequest("put", url, data, function (err, results) {
101101
if (err) {callback(error);}
102102
else {
@@ -111,7 +111,7 @@ SipPeer.prototype.editApplications = function(appData, callback) {
111111

112112
SipPeer.prototype.removeApplications = function(callback) {
113113
var url = this.client.concatAccountPath(SITE_PATH + "/" + this.siteId + "/" + SIP_PEER_PATH + "/" + this.id + "/" + "products" + "/" + "messaging" + "/" + "applicationSettings");
114-
const data = {applicationSettings: 'REMOVE'}
114+
const data = {applicationsSettings: 'REMOVE'}
115115
this.client.makeRequest("put", url, data, callback);
116116
}
117117

test/sipPeer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ describe("SipPeer", function(){
213213
describe("#editApplications", function() {
214214
it("should edit applications", function(done) {
215215
var appData = {httpMessagingV2AppId: 100}
216-
var span = helper.nock().put("/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings", helper.buildXml({applicationSettings: appData})).reply(200, helper.xml.peerApplications, {"Content-Type": "application/xml"});
216+
var span = helper.nock().put("/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings", helper.buildXml({applicationsSettings: appData})).reply(200, helper.xml.peerApplications, {"Content-Type": "application/xml"});
217217
var peer = new SipPeer();
218218
peer.id = 10;
219219
peer.siteId = 1;
@@ -232,8 +232,7 @@ describe("SipPeer", function(){
232232
describe("#removeApplications", function() {
233233
it("should remove applications", function(done) {
234234
var appData = 'REMOVE';
235-
console.log(helper.buildXml({applicationSettings: appData}))
236-
var span = helper.nock().put("/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings", helper.buildXml({applicationSettings: appData})).reply(200, helper.xml.peerApplications, {"Content-Type": "application/xml"});
235+
var span = helper.nock().put("/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings", helper.buildXml({applicationsSettings: appData})).reply(200, helper.xml.peerApplications, {"Content-Type": "application/xml"});
237236
var peer = new SipPeer();
238237
peer.id = 10;
239238
peer.siteId = 1;

0 commit comments

Comments
 (0)