Class: TentD::API::Followings::GetMany
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Followings::GetMany
- Defined in:
- lib/tentd/api/followings.rb
Instance Method Summary collapse
Methods inherited from Middleware
Methods included from Authorizable
#authorize_env!, #authorize_env?
Constructor Details
This class inherits a constructor from TentD::API::Middleware
Instance Method Details
#action(env) ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/tentd/api/followings.rb', line 56 def action(env) if (env, :read_followings) env.response = Model::Following.fetch_all(env.params) { |p,q,b| q << 'followings.confirmed = true' } else env.response = Model::Following.(env.params, env.current_auth) { |p,q,b| q << 'AND followings.confirmed = true' } end env end |