Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Commit

Permalink
Modified domains.memberships.list to return actual membership objects…
Browse files Browse the repository at this point in the history
… like dns.list and domains.list.
  • Loading branch information
anderly committed Nov 6, 2014
1 parent f0d144c commit d02f016
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dnsimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,14 @@ app.domains = {
memberships: {
// domains.memberships.list
list: function( domainname, callback ) {
app.talk( 'GET', 'domains/'+ domainname +'/memberships', callback )
app.talk( 'GET', 'domains/'+ domainname +'/memberships', function( error, memberships, meta ) {
if( error ) { callback( error, null, meta ); return }
var result = []
for( var i = 0; i < memberships.length; i++ ) {
result.push( memberships[i].membership )
}
callback( null, result, meta )
})
},

// domains.memberships.add
Expand Down

0 comments on commit d02f016

Please sign in to comment.