Merge branch 'kb_development' into kb_migration
This commit is contained in:
commit
9b032185b8
59 changed files with 1441 additions and 28 deletions
18
app/controllers/api/v1/accounts/antennas_controller.rb
Normal file
18
app/controllers/api/v1/accounts/antennas_controller.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::AntennasController < Api::BaseController
|
||||
before_action -> { doorkeeper_authorize! :read, :'read:lists' }
|
||||
before_action :require_user!
|
||||
before_action :set_account
|
||||
|
||||
def index
|
||||
@antennas = @account.suspended? ? [] : @account.joined_antennas.where(account: current_account)
|
||||
render json: @antennas, each_serializer: REST::AntennaSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
end
|
|
@ -30,6 +30,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
|
|||
:bot,
|
||||
:discoverable,
|
||||
:searchability,
|
||||
:dissubscribable,
|
||||
:hide_collections,
|
||||
fields_attributes: [:name, :value]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue