16 lines
356 B
Ruby
16 lines
356 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AccountsController < ApplicationController
|
|
before_action :set_account, only: %i[show]
|
|
|
|
def show
|
|
render json: @account, serializer: AccountProfileSerializer, scope: current_user
|
|
end
|
|
|
|
private
|
|
|
|
def set_account
|
|
@account = User.includes(:tournaments, player_teams: :tournament).find(params[:id])
|
|
end
|
|
end
|