mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-14 15:36:13 +10:00
13 lines
378 B
Ruby
13 lines
378 B
Ruby
class ApiController < ApplicationController
|
|
def profile
|
|
@person = Person.find_by_persona_id params[:persona_id]
|
|
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 |