* add organizations api request spec * add organizations api controller * add organizations api show route * add show jbuilder file * fix merge conflict on routes * add organization show to api docs * update created_at to iso format * api docs add format field/cleanup
16 lines
503 B
Ruby
16 lines
503 B
Ruby
module Api
|
|
module V0
|
|
class OrganizationsController < ApiController
|
|
SHOW_ATTRIBUTES_FOR_SERIALIZATION = %i[
|
|
username name summary twitter_username github_username url
|
|
location created_at profile_image tech_stack tag_line story
|
|
].freeze
|
|
private_constant :SHOW_ATTRIBUTES_FOR_SERIALIZATION
|
|
|
|
def show
|
|
@organization = Organization.select(SHOW_ATTRIBUTES_FOR_SERIALIZATION)
|
|
.find_by!(username: params[:org_username])
|
|
end
|
|
end
|
|
end
|
|
end
|