diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-01-11 11:55:42 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-01-11 11:55:42 +0100 |
commit | 33d30632fb627ba1742eff3e0c5fc84ccd156cdb (patch) | |
tree | b7c15bb354c9d2f0ef25c50ab387007703f599d6 /app/controllers/api | |
parent | d42e7e01dcd464f80637682d4eee6e5a7f36f26e (diff) | |
parent | 11d603101a7b3389c679b8c155a3cb06203ca31a (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/models/public_feed.rb`: Upstream refactored a bit, glitch-soc had specific code for local-only statuses. Updated glitch-soc's specific code accordingly.
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/v1/crypto/keys/claims_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/v1/crypto/keys/queries_controller.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 3e66ff212..953874e1a 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -42,7 +42,7 @@ class Api::V1::AccountsController < Api::BaseController end def mute - MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration] || 0)) + MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration]&.to_i || 0)) render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships end diff --git a/app/controllers/api/v1/crypto/keys/claims_controller.rb b/app/controllers/api/v1/crypto/keys/claims_controller.rb index 34b21a380..f9d202d67 100644 --- a/app/controllers/api/v1/crypto/keys/claims_controller.rb +++ b/app/controllers/api/v1/crypto/keys/claims_controller.rb @@ -12,7 +12,7 @@ class Api::V1::Crypto::Keys::ClaimsController < Api::BaseController private def set_claim_results - @claim_results = devices.map { |device_params| ::Keys::ClaimService.new.call(current_account, device_params[:account_id], device_params[:device_id]) }.compact + @claim_results = devices.filter_map { |device_params| ::Keys::ClaimService.new.call(current_account, device_params[:account_id], device_params[:device_id]) } end def resource_params diff --git a/app/controllers/api/v1/crypto/keys/queries_controller.rb b/app/controllers/api/v1/crypto/keys/queries_controller.rb index 0851d797d..e6ce9f919 100644 --- a/app/controllers/api/v1/crypto/keys/queries_controller.rb +++ b/app/controllers/api/v1/crypto/keys/queries_controller.rb @@ -17,7 +17,7 @@ class Api::V1::Crypto::Keys::QueriesController < Api::BaseController end def set_query_results - @query_results = @accounts.map { |account| ::Keys::QueryService.new.call(account) }.compact + @query_results = @accounts.filter_map { |account| ::Keys::QueryService.new.call(account) } end def account_ids |