diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-29 19:42:08 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-29 19:42:08 +0100 |
commit | 0e8f59c16fcb21301c736ecbc4424cb4c5388c42 (patch) | |
tree | 344ac1e0b2d165ba4fe3870f786e854710970ce1 /app/controllers/api/salmon_controller.rb | |
parent | 11ff92c9d7b27c2c9ed86f649aef8d956cc8b989 (diff) |
Refactoring Grape API methods into normal controllers & other things
Diffstat (limited to 'app/controllers/api/salmon_controller.rb')
-rw-r--r-- | app/controllers/api/salmon_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/api/salmon_controller.rb b/app/controllers/api/salmon_controller.rb new file mode 100644 index 000000000..99ec15bff --- /dev/null +++ b/app/controllers/api/salmon_controller.rb @@ -0,0 +1,14 @@ +class Api::SalmonController < ApplicationController + before_action :set_account + + def update + ProcessInteractionService.new.(request.body.read, @account) + render nothing: true, status: 201 + end + + private + + def set_account + @account = Account.find(params[:id]) + end +end |