]> cat aescling's git repositories - mastodon.git/blob - app/controllers/api/salmon_controller.rb
Merge branch 'master' into french-translation
[mastodon.git] / app / controllers / api / salmon_controller.rb
1 # frozen_string_literal: true
2
3 class Api::SalmonController < ApiController
4 before_action :set_account
5 respond_to :txt
6
7 def update
8 body = request.body.read
9
10 if body.nil?
11 head 200
12 else
13 SalmonWorker.perform_async(@account.id, body.force_encoding('UTF-8'))
14 head 201
15 end
16 end
17
18 private
19
20 def set_account
21 @account = Account.find(params[:id])
22 end
23 end
This page took 0.079315 seconds and 4 git commands to generate.