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 Dec 19, 2018
1 parent 7e5a8c0 commit cc4dd1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/providers_controller.rb
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 cc4dd1b

Please sign in to comment.