Class: TentD::API::Followers::Create
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Followers::Create
- Defined in:
- lib/tentd/api/followers.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
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/tentd/api/followers.rb', line 78 def action(env) return env if env..include?(:write_followers) if follower = Model::Follower.create_follower(env.params[:data].merge('profile' => env['profile'])) env. << :read_secrets env. << :self env.notify_action = 'create' env.notify_instance = follower env.response = follower end env end |