Class: TentD::API::Apps::DestroyAppAuthorization
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Apps::DestroyAppAuthorization
- Defined in:
- lib/tentd/api/apps.rb
Instance Method Summary collapse
Methods inherited from Middleware
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
143 144 145 146 147 148 149 150 |
# File 'lib/tentd/api/apps.rb', line 143 def action(env) (env, :write_apps) if (auth = TentD::Model::AppAuthorization.first(:app_id => env.params.app_id, :id => env.params.auth_id)) && auth.destroy env.response = '' end env end |