Class: TentD::API::Apps::Update

Inherits:
Middleware show all
Defined in:
lib/tentd/api/apps.rb

Instance Method Summary collapse

Methods inherited from Middleware

#call, #initialize

Methods included from TentD::API::Authorizable

#authorize_env!, #authorize_env?

Constructor Details

This class inherits a constructor from TentD::API::Middleware

Instance Method Details

#action(env) ⇒ Object



114
115
116
117
118
119
# File 'lib/tentd/api/apps.rb', line 114

def action(env)
  if app = Model::App.update_from_params(env.params.app_id, env.params.data)
    env.response = app
  end
  env
end