Skip to content

Commit

Permalink
dev: bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
shripadk committed Nov 20, 2011
1 parent adf2692 commit c8ab093
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ sms.prototype.send = function(options, callback) {

try {
var res = JSON.parse(body);
var description = Codes(res.status);
var description = Codes[parseInt(res[0].status)];
res['status'] = res[0].status;
res['statusText'] = description.status;
res['meaning'] = description.meaning;

Expand Down
2 changes: 1 addition & 1 deletion test/sms.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ module.exports['test nexmo.sms.send'] = testCase({
from: SMSFixture.from,
to: SMSFixture.to,
type: 'text',
text: 'Hello World!'
text: 'Hello World!'
}, function() {
console.log(arguments);
test.done();
Expand Down

0 comments on commit c8ab093

Please sign in to comment.