cartodb-4.42/app/controllers/carto/api/public/users_controller.rb
2024-04-06 05:25:13 +00:00

20 lines
546 B
Ruby

module Carto
module Api
module Public
class UsersController < Carto::Api::Public::ApplicationController
ssl_required
def me_public
presentation = if request_api_key.user_data.try(:include?, 'profile')
UserPublicProfilePresenter.new(request_api_key.user).to_hash
else
UserPublicPresenter.new(request_api_key.user).to_hash
end
render(json: presentation)
end
end
end
end
end