1
0
Fork 0
forked from gitea/nas

Add account to antenna webui

This commit is contained in:
KMY 2023-04-25 10:30:30 +09:00
parent 69df23d8d9
commit 0d5a6adc43
20 changed files with 644 additions and 1 deletions

View 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