Skip to content

Commit

Permalink
[spaceship] update Spaceship::ConnectAPI::User model to include `de…
Browse files Browse the repository at this point in the history
…lete!` method (#20251)

* Update Spaceship::ConnectAPI::User model to include delete! method

* Move delete! method above get_visible_apps
  • Loading branch information
liamnichols committed May 18, 2022
1 parent eb4584e commit 2d78ca2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spaceship/lib/spaceship/connect_api/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def self.find(client: nil, email: nil, includes: ESSENTIAL_INCLUDES)
return all(client: client, filter: { email: email }, includes: includes)
end

def delete!(client: nil)
client ||= Spaceship::ConnectAPI
client.delete_user(user_id: id)
end

def get_visible_apps(client: nil, limit: nil)
client ||= Spaceship::ConnectAPI
resp = client.get_user_visible_apps(user_id: id, limit: limit)
Expand Down

0 comments on commit 2d78ca2

Please sign in to comment.