Skip to content

Commit

Permalink
Use the new universal methods for suspending/resuming a provider
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Jul 27, 2018
1 parent 65178b7 commit c1fccb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ def options

def pause_resource(type, id, _data)
provider = resource_search(id, type, collection_class(type))
provider.disable!
provider.pause!
action_result(true, "Paused #{provider_ident(provider)}")
rescue => err
action_result(false, "Could not pause Provider - #{err}")
end

def resume_resource(type, id, _data)
provider = resource_search(id, type, collection_class(type))
provider.enable!
provider.resume!
action_result(true, "Resumed #{provider_ident(provider)}")
rescue => err
action_result(false, "Could not resume Provider - #{err}")
Expand Down

0 comments on commit c1fccb3

Please sign in to comment.