mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-10 05:27:03 +10:00
13 lines
372 B
Ruby
13 lines
372 B
Ruby
class ApiController < ApplicationController
|
|
def profile
|
|
@person = Person.find_by_account params[:account]
|
|
unless current_person.blessed?
|
|
@person = nil if @person and (current_person.teams & @person.teams).empty?
|
|
end
|
|
if @person
|
|
render json: @person.api_attributes
|
|
else
|
|
render json: {}, status: :unprocessable_entity
|
|
end
|
|
end
|
|
end |